Migrated database stuff
This commit is contained in:
@@ -19,9 +19,9 @@
|
|||||||
|
|
||||||
#include "AuthServiceBase.hpp"
|
#include "AuthServiceBase.hpp"
|
||||||
|
|
||||||
#include "database/Db.hpp"
|
#include "services/database/Db.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
|
|
||||||
namespace Auth
|
namespace Auth
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace Database
|
namespace Database
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
#include <Wt/WRandom.h>
|
#include <Wt/WRandom.h>
|
||||||
|
|
||||||
#include "services/auth/Types.hpp"
|
#include "services/auth/Types.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "utils/Exception.hpp"
|
#include "utils/Exception.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,8 @@
|
|||||||
#endif // LMS_SUPPORT_PAM
|
#endif // LMS_SUPPORT_PAM
|
||||||
|
|
||||||
#include "services/auth/Types.hpp"
|
#include "services/auth/Types.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "utils/Exception.hpp"
|
#include "utils/Exception.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
#include "services/auth/IAuthTokenService.hpp"
|
#include "services/auth/IAuthTokenService.hpp"
|
||||||
#include "services/auth/Types.hpp"
|
#include "services/auth/Types.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "utils/Exception.hpp"
|
#include "utils/Exception.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <Wt/Auth/HashFunction.h>
|
#include <Wt/Auth/HashFunction.h>
|
||||||
#include <Wt/Auth/PasswordStrengthValidator.h>
|
#include <Wt/Auth/PasswordStrengthValidator.h>
|
||||||
|
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "PasswordServiceBase.hpp"
|
#include "PasswordServiceBase.hpp"
|
||||||
#include "LoginThrottler.hpp"
|
#include "LoginThrottler.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
#include <security/pam_appl.h>
|
#include <security/pam_appl.h>
|
||||||
|
|
||||||
#include "services/auth/Types.hpp"
|
#include "services/auth/Types.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
|
|
||||||
namespace Auth
|
namespace Auth
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
#include <boost/asio/ip/address.hpp>
|
#include <boost/asio/ip/address.hpp>
|
||||||
#include <Wt/WDateTime.h>
|
#include <Wt/WDateTime.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace Database
|
namespace Database
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <optional>
|
#include <optional>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace Database
|
namespace Database
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include <Wt/Dbo/ptr.h>
|
#include <Wt/Dbo/ptr.h>
|
||||||
|
|
||||||
#include "services/auth/Types.hpp"
|
#include "services/auth/Types.hpp"
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace Database
|
namespace Database
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "utils/Exception.hpp"
|
#include "utils/Exception.hpp"
|
||||||
|
|
||||||
namespace Auth
|
namespace Auth
|
||||||
|
|||||||
@@ -21,10 +21,10 @@
|
|||||||
|
|
||||||
#include "av/IAudioFile.hpp"
|
#include "av/IAudioFile.hpp"
|
||||||
|
|
||||||
#include "database/Db.hpp"
|
#include "services/database/Db.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
|
|
||||||
#include "image/Exception.hpp"
|
#include "image/Exception.hpp"
|
||||||
#include "image/IRawImage.hpp"
|
#include "image/IRawImage.hpp"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include "services/cover/ICoverService.hpp"
|
#include "services/cover/ICoverService.hpp"
|
||||||
#include "image/IEncodedImage.hpp"
|
#include "image/IEncodedImage.hpp"
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace Database
|
namespace Database
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "image/IEncodedImage.hpp"
|
#include "image/IEncodedImage.hpp"
|
||||||
|
|
||||||
namespace Database
|
namespace Database
|
||||||
|
|||||||
@@ -16,15 +16,15 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
|
|
||||||
#include <Wt/Dbo/WtSqlTraits.h>
|
#include <Wt/Dbo/WtSqlTraits.h>
|
||||||
|
|
||||||
#include "database/Cluster.hpp"
|
#include "services/database/Cluster.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
#include "SqlQuery.hpp"
|
#include "SqlQuery.hpp"
|
||||||
#include "Utils.hpp"
|
#include "Utils.hpp"
|
||||||
|
|||||||
@@ -17,13 +17,13 @@
|
|||||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "database/Cluster.hpp"
|
#include "services/database/Cluster.hpp"
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/ScanSettings.hpp"
|
#include "services/database/ScanSettings.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "SqlQuery.hpp"
|
#include "SqlQuery.hpp"
|
||||||
#include "Traits.hpp"
|
#include "Traits.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -17,13 +17,13 @@
|
|||||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "database/Db.hpp"
|
#include "services/database/Db.hpp"
|
||||||
|
|
||||||
#include <Wt/Dbo/FixedSqlConnectionPool.h>
|
#include <Wt/Dbo/FixedSqlConnectionPool.h>
|
||||||
#include <Wt/Dbo/backend/Sqlite3.h>
|
#include <Wt/Dbo/backend/Sqlite3.h>
|
||||||
|
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
|
|
||||||
namespace Database {
|
namespace Database {
|
||||||
|
|||||||
@@ -17,15 +17,15 @@
|
|||||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
|
|
||||||
#include <Wt/Dbo/WtSqlTraits.h>
|
#include <Wt/Dbo/WtSqlTraits.h>
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Cluster.hpp"
|
#include "services/database/Cluster.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
#include "SqlQuery.hpp"
|
#include "SqlQuery.hpp"
|
||||||
#include "Traits.hpp"
|
#include "Traits.hpp"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "database/ScanSettings.hpp"
|
#include "services/database/ScanSettings.hpp"
|
||||||
|
|
||||||
#include <Wt/Dbo/WtSqlTraits.h>
|
#include <Wt/Dbo/WtSqlTraits.h>
|
||||||
|
|
||||||
@@ -25,8 +25,8 @@
|
|||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
#include "utils/String.hpp"
|
#include "utils/String.hpp"
|
||||||
|
|
||||||
#include "database/Cluster.hpp"
|
#include "services/database/Cluster.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
@@ -27,17 +27,17 @@
|
|||||||
#include "utils/Exception.hpp"
|
#include "utils/Exception.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Cluster.hpp"
|
#include "services/database/Cluster.hpp"
|
||||||
#include "database/Db.hpp"
|
#include "services/database/Db.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/ScanSettings.hpp"
|
#include "services/database/ScanSettings.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "database/TrackBookmark.hpp"
|
#include "services/database/TrackBookmark.hpp"
|
||||||
#include "database/TrackArtistLink.hpp"
|
#include "services/database/TrackArtistLink.hpp"
|
||||||
#include "database/TrackList.hpp"
|
#include "services/database/TrackList.hpp"
|
||||||
#include "database/TrackFeatures.hpp"
|
#include "services/database/TrackFeatures.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
|
|
||||||
namespace Database
|
namespace Database
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,17 +17,17 @@
|
|||||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
|
|
||||||
#include <Wt/Dbo/WtSqlTraits.h>
|
#include <Wt/Dbo/WtSqlTraits.h>
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Cluster.hpp"
|
#include "services/database/Cluster.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/TrackArtistLink.hpp"
|
#include "services/database/TrackArtistLink.hpp"
|
||||||
#include "database/TrackFeatures.hpp"
|
#include "services/database/TrackFeatures.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
|
|
||||||
#include "SqlQuery.hpp"
|
#include "SqlQuery.hpp"
|
||||||
|
|||||||
@@ -17,11 +17,11 @@
|
|||||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "database/TrackArtistLink.hpp"
|
#include "services/database/TrackArtistLink.hpp"
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
|
|
||||||
#include "Traits.hpp"
|
#include "Traits.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -17,11 +17,11 @@
|
|||||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "database/TrackBookmark.hpp"
|
#include "services/database/TrackBookmark.hpp"
|
||||||
|
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "Traits.hpp"
|
#include "Traits.hpp"
|
||||||
|
|
||||||
namespace Database {
|
namespace Database {
|
||||||
|
|||||||
@@ -17,13 +17,13 @@
|
|||||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "database/TrackFeatures.hpp"
|
#include "services/database/TrackFeatures.hpp"
|
||||||
|
|
||||||
#include <boost/property_tree/ptree.hpp>
|
#include <boost/property_tree/ptree.hpp>
|
||||||
#include <boost/property_tree/json_parser.hpp>
|
#include <boost/property_tree/json_parser.hpp>
|
||||||
|
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
|
|
||||||
namespace Database {
|
namespace Database {
|
||||||
|
|||||||
@@ -16,18 +16,18 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "database/TrackList.hpp"
|
#include "services/database/TrackList.hpp"
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Cluster.hpp"
|
#include "services/database/Cluster.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "SqlQuery.hpp"
|
#include "SqlQuery.hpp"
|
||||||
#include "StringViewTraits.hpp"
|
#include "StringViewTraits.hpp"
|
||||||
#include "Traits.hpp"
|
#include "Traits.hpp"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
#include <Wt/Dbo/StdSqlTraits.h>
|
#include <Wt/Dbo/StdSqlTraits.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace Wt::Dbo
|
namespace Wt::Dbo
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,13 +17,13 @@
|
|||||||
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "database/TrackList.hpp"
|
#include "services/database/TrackList.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
#include "StringViewTraits.hpp"
|
#include "StringViewTraits.hpp"
|
||||||
#include "Traits.hpp"
|
#include "Traits.hpp"
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@
|
|||||||
#include <Wt/WDateTime.h>
|
#include <Wt/WDateTime.h>
|
||||||
#include <Wt/Dbo/Dbo.h>
|
#include <Wt/Dbo/Dbo.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "utils/EnumSet.hpp"
|
#include "utils/EnumSet.hpp"
|
||||||
#include "utils/UUID.hpp"
|
#include "utils/UUID.hpp"
|
||||||
|
|
||||||
+1
-1
@@ -26,7 +26,7 @@
|
|||||||
#include <Wt/Dbo/Dbo.h>
|
#include <Wt/Dbo/Dbo.h>
|
||||||
#include <Wt/WDateTime.h>
|
#include <Wt/WDateTime.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace Database {
|
namespace Database {
|
||||||
|
|
||||||
+1
-1
@@ -25,7 +25,7 @@
|
|||||||
#include <Wt/WDateTime.h>
|
#include <Wt/WDateTime.h>
|
||||||
#include <Wt/Dbo/Dbo.h>
|
#include <Wt/Dbo/Dbo.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "utils/UUID.hpp"
|
#include "utils/UUID.hpp"
|
||||||
|
|
||||||
namespace Database
|
namespace Database
|
||||||
+1
-1
@@ -25,7 +25,7 @@
|
|||||||
#include <Wt/Dbo/Dbo.h>
|
#include <Wt/Dbo/Dbo.h>
|
||||||
#include <Wt/WTime.h>
|
#include <Wt/WTime.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace Database {
|
namespace Database {
|
||||||
|
|
||||||
+1
-1
@@ -34,7 +34,7 @@
|
|||||||
#include "utils/EnumSet.hpp"
|
#include "utils/EnumSet.hpp"
|
||||||
#include "utils/UUID.hpp"
|
#include "utils/UUID.hpp"
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace Database {
|
namespace Database {
|
||||||
|
|
||||||
+1
-1
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include <Wt/Dbo/Dbo.h>
|
#include <Wt/Dbo/Dbo.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "utils/EnumSet.hpp"
|
#include "utils/EnumSet.hpp"
|
||||||
|
|
||||||
namespace Database
|
namespace Database
|
||||||
+1
-1
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include <Wt/Dbo/Dbo.h>
|
#include <Wt/Dbo/Dbo.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace Database {
|
namespace Database {
|
||||||
|
|
||||||
+1
-1
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
#include <Wt/Dbo/Dbo.h>
|
#include <Wt/Dbo/Dbo.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace Database {
|
namespace Database {
|
||||||
|
|
||||||
+1
-1
@@ -27,7 +27,7 @@
|
|||||||
#include <Wt/Dbo/Dbo.h>
|
#include <Wt/Dbo/Dbo.h>
|
||||||
#include <Wt/WDateTime.h>
|
#include <Wt/WDateTime.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace Database {
|
namespace Database {
|
||||||
|
|
||||||
+1
-1
@@ -26,7 +26,7 @@
|
|||||||
#include <Wt/Dbo/Dbo.h>
|
#include <Wt/Dbo/Dbo.h>
|
||||||
#include <Wt/WDateTime.h>
|
#include <Wt/WDateTime.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "utils/UUID.hpp"
|
#include "utils/UUID.hpp"
|
||||||
|
|
||||||
namespace Database {
|
namespace Database {
|
||||||
@@ -24,17 +24,17 @@
|
|||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Cluster.hpp"
|
#include "services/database/Cluster.hpp"
|
||||||
#include "database/Db.hpp"
|
#include "services/database/Db.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "database/TrackArtistLink.hpp"
|
#include "services/database/TrackArtistLink.hpp"
|
||||||
#include "database/TrackBookmark.hpp"
|
#include "services/database/TrackBookmark.hpp"
|
||||||
#include "database/TrackList.hpp"
|
#include "services/database/TrackList.hpp"
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class ScopedEntity
|
class ScopedEntity
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <functional>
|
#include <functional>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "utils/EnumSet.hpp"
|
#include "utils/EnumSet.hpp"
|
||||||
#include "services/recommendation/Types.hpp"
|
#include "services/recommendation/Types.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -25,9 +25,9 @@
|
|||||||
#include "ClustersEngineCreator.hpp"
|
#include "ClustersEngineCreator.hpp"
|
||||||
#include "FeaturesEngineCreator.hpp"
|
#include "FeaturesEngineCreator.hpp"
|
||||||
|
|
||||||
#include "database/Db.hpp"
|
#include "services/database/Db.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/ScanSettings.hpp"
|
#include "services/database/ScanSettings.hpp"
|
||||||
#include "utils/Exception.hpp"
|
#include "utils/Exception.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -19,13 +19,13 @@
|
|||||||
|
|
||||||
#include "ClustersEngine.hpp"
|
#include "ClustersEngine.hpp"
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Cluster.hpp"
|
#include "services/database/Cluster.hpp"
|
||||||
#include "database/Db.hpp"
|
#include "services/database/Db.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "database/TrackList.hpp"
|
#include "services/database/TrackList.hpp"
|
||||||
|
|
||||||
namespace Recommendation {
|
namespace Recommendation {
|
||||||
|
|
||||||
|
|||||||
@@ -21,14 +21,14 @@
|
|||||||
|
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Db.hpp"
|
#include "services/database/Db.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "database/TrackArtistLink.hpp"
|
#include "services/database/TrackArtistLink.hpp"
|
||||||
#include "database/TrackFeatures.hpp"
|
#include "services/database/TrackFeatures.hpp"
|
||||||
#include "database/TrackList.hpp"
|
#include "services/database/TrackList.hpp"
|
||||||
#include "som/DataNormalizer.hpp"
|
#include "som/DataNormalizer.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
#include "utils/Random.hpp"
|
#include "utils/Random.hpp"
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "som/Network.hpp"
|
#include "som/Network.hpp"
|
||||||
|
|
||||||
namespace Recommendation {
|
namespace Recommendation {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace Recommendation
|
namespace Recommendation
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,13 +24,13 @@
|
|||||||
|
|
||||||
#include <Wt/WLocalDateTime.h>
|
#include <Wt/WLocalDateTime.h>
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Cluster.hpp"
|
#include "services/database/Cluster.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/ScanSettings.hpp"
|
#include "services/database/ScanSettings.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "database/TrackArtistLink.hpp"
|
#include "services/database/TrackArtistLink.hpp"
|
||||||
#include "database/TrackFeatures.hpp"
|
#include "services/database/TrackFeatures.hpp"
|
||||||
#include "metadata/TagLibParser.hpp"
|
#include "metadata/TagLibParser.hpp"
|
||||||
#include "services/recommendation/IRecommendationService.hpp"
|
#include "services/recommendation/IRecommendationService.hpp"
|
||||||
#include "utils/Exception.hpp"
|
#include "utils/Exception.hpp"
|
||||||
|
|||||||
@@ -30,9 +30,9 @@
|
|||||||
|
|
||||||
#include <boost/asio/system_timer.hpp>
|
#include <boost/asio/system_timer.hpp>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "database/ScanSettings.hpp"
|
#include "services/database/ScanSettings.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "metadata/IParser.hpp"
|
#include "metadata/IParser.hpp"
|
||||||
#include "services/scanner/IScannerService.hpp"
|
#include "services/scanner/IScannerService.hpp"
|
||||||
#include "utils/Path.hpp"
|
#include "utils/Path.hpp"
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace Scanner {
|
namespace Scanner {
|
||||||
|
|
||||||
|
|||||||
@@ -19,13 +19,13 @@
|
|||||||
|
|
||||||
#include "ScrobblingService.hpp"
|
#include "ScrobblingService.hpp"
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Db.hpp"
|
#include "services/database/Db.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "database/TrackList.hpp"
|
#include "services/database/TrackList.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
|
|
||||||
#include "internal/InternalScrobbler.hpp"
|
#include "internal/InternalScrobbler.hpp"
|
||||||
#include "listenbrainz/ListenBrainzScrobbler.hpp"
|
#include "listenbrainz/ListenBrainzScrobbler.hpp"
|
||||||
|
|||||||
@@ -19,11 +19,11 @@
|
|||||||
|
|
||||||
#include "InternalScrobbler.hpp"
|
#include "InternalScrobbler.hpp"
|
||||||
|
|
||||||
#include "database/Db.hpp"
|
#include "services/database/Db.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "database/TrackList.hpp"
|
#include "services/database/TrackList.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
|
|
||||||
namespace Scrobbling
|
namespace Scrobbling
|
||||||
|
|||||||
@@ -24,13 +24,13 @@
|
|||||||
#include <Wt/Json/Value.h>
|
#include <Wt/Json/Value.h>
|
||||||
#include <Wt/Json/Serializer.h>
|
#include <Wt/Json/Serializer.h>
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Db.hpp"
|
#include "services/database/Db.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "database/TrackList.hpp"
|
#include "services/database/TrackList.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "utils/IConfig.hpp"
|
#include "utils/IConfig.hpp"
|
||||||
#include "utils/http/IClient.hpp"
|
#include "utils/http/IClient.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
|
|||||||
@@ -25,13 +25,13 @@
|
|||||||
#include <Wt/Json/Value.h>
|
#include <Wt/Json/Value.h>
|
||||||
#include <Wt/Json/Serializer.h>
|
#include <Wt/Json/Serializer.h>
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Db.hpp"
|
#include "services/database/Db.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "database/TrackList.hpp"
|
#include "services/database/TrackList.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "services/scrobbling/Exception.hpp"
|
#include "services/scrobbling/Exception.hpp"
|
||||||
#include "utils/IConfig.hpp"
|
#include "utils/IConfig.hpp"
|
||||||
#include "utils/http/IClient.hpp"
|
#include "utils/http/IClient.hpp"
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include <boost/asio/steady_timer.hpp>
|
#include <boost/asio/steady_timer.hpp>
|
||||||
#include <Wt/Dbo/Dbo.h>
|
#include <Wt/Dbo/Dbo.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "services/scrobbling/Listen.hpp"
|
#include "services/scrobbling/Listen.hpp"
|
||||||
|
|
||||||
namespace Database
|
namespace Database
|
||||||
|
|||||||
@@ -21,9 +21,9 @@
|
|||||||
|
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/TrackList.hpp"
|
#include "services/database/TrackList.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
|
|
||||||
static constexpr std::string_view historyTracklistName {"__scrobbler_listenbrainz_history__"};
|
static constexpr std::string_view historyTracklistName {"__scrobbler_listenbrainz_history__"};
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <Wt/Dbo/ptr.h>
|
#include <Wt/Dbo/ptr.h>
|
||||||
#include "utils/UUID.hpp"
|
#include "utils/UUID.hpp"
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace Database
|
namespace Database
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
#include <Wt/WDateTime.h>
|
#include <Wt/WDateTime.h>
|
||||||
|
|
||||||
#include "services/scrobbling/Listen.hpp"
|
#include "services/scrobbling/Listen.hpp"
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace Database
|
namespace Database
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include <Wt/WDateTime.h>
|
#include <Wt/WDateTime.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace Scrobbling
|
namespace Scrobbling
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#include <Wt/Http/Request.h>
|
#include <Wt/Http/Request.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "utils/String.hpp"
|
#include "utils/String.hpp"
|
||||||
#include "SubsonicResponse.hpp"
|
#include "SubsonicResponse.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include <Wt/Http/Request.h>
|
#include <Wt/Http/Request.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "ClientInfo.hpp"
|
#include "ClientInfo.hpp"
|
||||||
#include "ProtocolVersion.hpp"
|
#include "ProtocolVersion.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -22,9 +22,9 @@
|
|||||||
#include "av/TranscodeParameters.hpp"
|
#include "av/TranscodeParameters.hpp"
|
||||||
#include "av/TranscodeResourceHandlerCreator.hpp"
|
#include "av/TranscodeResourceHandlerCreator.hpp"
|
||||||
#include "av/Types.hpp"
|
#include "av/Types.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "utils/IResourceHandler.hpp"
|
#include "utils/IResourceHandler.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
#include "utils/FileResourceHandlerCreator.hpp"
|
#include "utils/FileResourceHandlerCreator.hpp"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "utils/String.hpp"
|
#include "utils/String.hpp"
|
||||||
|
|
||||||
namespace API::Subsonic
|
namespace API::Subsonic
|
||||||
|
|||||||
@@ -28,15 +28,15 @@
|
|||||||
|
|
||||||
#include "services/auth/IPasswordService.hpp"
|
#include "services/auth/IPasswordService.hpp"
|
||||||
#include "services/auth/IEnvService.hpp"
|
#include "services/auth/IEnvService.hpp"
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Cluster.hpp"
|
#include "services/database/Cluster.hpp"
|
||||||
#include "database/Db.hpp"
|
#include "services/database/Db.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "database/TrackBookmark.hpp"
|
#include "services/database/TrackBookmark.hpp"
|
||||||
#include "database/TrackList.hpp"
|
#include "services/database/TrackList.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "services/recommendation/IRecommendationService.hpp"
|
#include "services/recommendation/IRecommendationService.hpp"
|
||||||
#include "services/scrobbling/IScrobblingService.hpp"
|
#include "services/scrobbling/IScrobblingService.hpp"
|
||||||
#include "services/cover/ICoverService.hpp"
|
#include "services/cover/ICoverService.hpp"
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#include <Wt/WResource.h>
|
#include <Wt/WResource.h>
|
||||||
#include <Wt/Http/Response.h>
|
#include <Wt/Http/Response.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "ClientInfo.hpp"
|
#include "ClientInfo.hpp"
|
||||||
#include "RequestContext.hpp"
|
#include "RequestContext.hpp"
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -29,12 +29,12 @@
|
|||||||
#include "services/auth/IPasswordService.hpp"
|
#include "services/auth/IPasswordService.hpp"
|
||||||
#include "services/auth/IEnvService.hpp"
|
#include "services/auth/IEnvService.hpp"
|
||||||
#include "services/cover/ICoverService.hpp"
|
#include "services/cover/ICoverService.hpp"
|
||||||
#include "database/Db.hpp"
|
#include "services/database/Db.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "services/scanner/IScannerService.hpp"
|
|
||||||
#include "subsonic/SubsonicResource.hpp"
|
|
||||||
#include "services/recommendation/IRecommendationService.hpp"
|
#include "services/recommendation/IRecommendationService.hpp"
|
||||||
|
#include "services/scanner/IScannerService.hpp"
|
||||||
#include "services/scrobbling/IScrobblingService.hpp"
|
#include "services/scrobbling/IScrobblingService.hpp"
|
||||||
|
#include "subsonic/SubsonicResource.hpp"
|
||||||
#include "ui/LmsApplication.hpp"
|
#include "ui/LmsApplication.hpp"
|
||||||
#include "ui/LmsApplicationManager.hpp"
|
#include "ui/LmsApplicationManager.hpp"
|
||||||
#include "utils/http/IClient.hpp"
|
#include "utils/http/IClient.hpp"
|
||||||
|
|||||||
+2
-2
@@ -30,8 +30,8 @@
|
|||||||
|
|
||||||
#include "services/auth/IAuthTokenService.hpp"
|
#include "services/auth/IAuthTokenService.hpp"
|
||||||
#include "services/auth/IPasswordService.hpp"
|
#include "services/auth/IPasswordService.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
#include "utils/Service.hpp"
|
#include "utils/Service.hpp"
|
||||||
|
|
||||||
|
|||||||
+12
-11
@@ -21,19 +21,20 @@
|
|||||||
|
|
||||||
#include <Wt/WTemplateFormView.h>
|
#include <Wt/WTemplateFormView.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace UserInterface {
|
namespace UserInterface
|
||||||
|
|
||||||
std::optional<Database::UserId>
|
|
||||||
processAuthToken(const Wt::WEnvironment& env);
|
|
||||||
|
|
||||||
class Auth : public Wt::WTemplateFormView
|
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
Auth();
|
|
||||||
|
|
||||||
Wt::Signal<Database::UserId> userLoggedIn;
|
std::optional<Database::UserId>
|
||||||
};
|
processAuthToken(const Wt::WEnvironment& env);
|
||||||
|
|
||||||
|
class Auth : public Wt::WTemplateFormView
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Auth();
|
||||||
|
|
||||||
|
Wt::Signal<Database::UserId> userLoggedIn;
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace UserInterface
|
} // namespace UserInterface
|
||||||
|
|||||||
@@ -31,12 +31,12 @@
|
|||||||
#include "services/auth/IEnvService.hpp"
|
#include "services/auth/IEnvService.hpp"
|
||||||
#include "services/auth/IPasswordService.hpp"
|
#include "services/auth/IPasswordService.hpp"
|
||||||
#include "services/cover/ICoverService.hpp"
|
#include "services/cover/ICoverService.hpp"
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Cluster.hpp"
|
#include "services/database/Cluster.hpp"
|
||||||
#include "database/Db.hpp"
|
#include "services/database/Db.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "services/scrobbling/IScrobblingService.hpp"
|
#include "services/scrobbling/IScrobblingService.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
#include "utils/Service.hpp"
|
#include "utils/Service.hpp"
|
||||||
|
|||||||
@@ -19,41 +19,38 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "utils/Exception.hpp"
|
#include "utils/Exception.hpp"
|
||||||
|
|
||||||
namespace UserInterface {
|
namespace UserInterface
|
||||||
|
|
||||||
|
|
||||||
class LmsApplicationException : public LmsException
|
|
||||||
{
|
{
|
||||||
public:
|
class LmsApplicationException : public LmsException
|
||||||
LmsApplicationException(const Wt::WString& error) : LmsException {error.toUTF8()} {}
|
{
|
||||||
};
|
public:
|
||||||
|
LmsApplicationException(const Wt::WString& error) : LmsException {error.toUTF8()} {}
|
||||||
|
};
|
||||||
|
|
||||||
class ArtistNotFoundException : public LmsApplicationException
|
class ArtistNotFoundException : public LmsApplicationException
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ArtistNotFoundException() : LmsApplicationException {Wt::WString::tr("Lms.Error.artist-not-found")} {}
|
ArtistNotFoundException() : LmsApplicationException {Wt::WString::tr("Lms.Error.artist-not-found")} {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class ReleaseNotFoundException : public LmsApplicationException
|
class ReleaseNotFoundException : public LmsApplicationException
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ReleaseNotFoundException() : LmsApplicationException {Wt::WString::tr("Lms.Error.release-not-found")} {}
|
ReleaseNotFoundException() : LmsApplicationException {Wt::WString::tr("Lms.Error.release-not-found")} {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class UserNotFoundException : public LmsApplicationException
|
class UserNotFoundException : public LmsApplicationException
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
UserNotFoundException() : LmsApplicationException {Wt::WString::tr("Lms.Error.user-not-found")} {}
|
UserNotFoundException() : LmsApplicationException {Wt::WString::tr("Lms.Error.user-not-found")} {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class UserNotAllowedException : public LmsApplicationException
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
UserNotAllowedException() : LmsApplicationException {Wt::WString::tr("Lms.Error.user-not-allowed")} {}
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
class UserNotAllowedException : public LmsApplicationException
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
UserNotAllowedException() : LmsApplicationException {Wt::WString::tr("Lms.Error.user-not-allowed")} {}
|
||||||
|
};
|
||||||
|
} // ns UserInterface
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include <Wt/WSignal.h>
|
#include <Wt/WSignal.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace UserInterface
|
namespace UserInterface
|
||||||
{
|
{
|
||||||
|
|||||||
+12
-14
@@ -24,23 +24,21 @@
|
|||||||
#include <Wt/WBootstrapTheme.h>
|
#include <Wt/WBootstrapTheme.h>
|
||||||
#include <Wt/WLinkedCssStyleSheet.h>
|
#include <Wt/WLinkedCssStyleSheet.h>
|
||||||
|
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
|
|
||||||
namespace UserInterface {
|
namespace UserInterface
|
||||||
|
|
||||||
class LmsTheme : public Wt::WBootstrapTheme
|
|
||||||
{
|
{
|
||||||
public:
|
class LmsTheme : public Wt::WBootstrapTheme
|
||||||
LmsTheme(Database::User::UITheme theme);
|
{
|
||||||
|
public:
|
||||||
|
LmsTheme(Database::User::UITheme theme);
|
||||||
|
|
||||||
void setTheme(Database::User::UITheme theme);
|
void setTheme(Database::User::UITheme theme);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
std::vector<Wt::WLinkedCssStyleSheet> styleSheets() const override;
|
||||||
std::vector<Wt::WLinkedCssStyleSheet> styleSheets() const override;
|
static std::vector<Wt::WLink> getStyleSheets(Database::User::UITheme theme);
|
||||||
static std::vector<Wt::WLink> getStyleSheets(Database::User::UITheme theme);
|
|
||||||
|
|
||||||
Database::User::UITheme _theme;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
Database::User::UITheme _theme;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,13 +25,13 @@
|
|||||||
|
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "database/TrackList.hpp"
|
#include "services/database/TrackList.hpp"
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
|
|
||||||
#include "resource/CoverResource.hpp"
|
#include "resource/CoverResource.hpp"
|
||||||
#include "resource/AudioTranscodeResource.hpp"
|
#include "resource/AudioTranscodeResource.hpp"
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
#include <Wt/WTemplate.h>
|
#include <Wt/WTemplate.h>
|
||||||
#include <Wt/WText.h>
|
#include <Wt/WText.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace UserInterface {
|
namespace UserInterface {
|
||||||
|
|
||||||
|
|||||||
@@ -22,12 +22,12 @@
|
|||||||
#include <Wt/WPopupMenu.h>
|
#include <Wt/WPopupMenu.h>
|
||||||
#include <Wt/WText.h>
|
#include <Wt/WText.h>
|
||||||
|
|
||||||
#include "database/Cluster.hpp"
|
#include "services/database/Cluster.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "database/TrackList.hpp"
|
#include "services/database/TrackList.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "services/recommendation/IRecommendationService.hpp"
|
#include "services/recommendation/IRecommendationService.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
#include "utils/Random.hpp"
|
#include "utils/Random.hpp"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include <Wt/WTemplate.h>
|
#include <Wt/WTemplate.h>
|
||||||
#include <Wt/WText.h>
|
#include <Wt/WText.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "PlayQueueAction.hpp"
|
#include "PlayQueueAction.hpp"
|
||||||
|
|
||||||
namespace Similarity
|
namespace Similarity
|
||||||
|
|||||||
@@ -22,11 +22,10 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <Wt/WSignal.h>
|
#include <Wt/WSignal.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace UserInterface
|
namespace UserInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
enum class PlayQueueAction
|
enum class PlayQueueAction
|
||||||
{
|
{
|
||||||
Play,
|
Play,
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
#include "common/ValueStringModel.hpp"
|
#include "common/ValueStringModel.hpp"
|
||||||
|
|
||||||
#include "services/auth/IPasswordService.hpp"
|
#include "services/auth/IPasswordService.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "utils/IConfig.hpp"
|
#include "utils/IConfig.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
#include "utils/Service.hpp"
|
#include "utils/Service.hpp"
|
||||||
|
|||||||
@@ -26,9 +26,9 @@
|
|||||||
#include <Wt/WString.h>
|
#include <Wt/WString.h>
|
||||||
#include <Wt/WTemplateFormView.h>
|
#include <Wt/WTemplateFormView.h>
|
||||||
|
|
||||||
#include "database/Cluster.hpp"
|
#include "services/database/Cluster.hpp"
|
||||||
#include "database/ScanSettings.hpp"
|
#include "services/database/ScanSettings.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "services/scanner/IScannerService.hpp"
|
#include "services/scanner/IScannerService.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
#include "utils/Service.hpp"
|
#include "utils/Service.hpp"
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
#include <Wt/WPushButton.h>
|
#include <Wt/WPushButton.h>
|
||||||
|
|
||||||
#include "services/auth/IPasswordService.hpp"
|
#include "services/auth/IPasswordService.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "utils/Exception.hpp"
|
#include "utils/Exception.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
#include "utils/Service.hpp"
|
#include "utils/Service.hpp"
|
||||||
|
|||||||
@@ -28,8 +28,8 @@
|
|||||||
#include <Wt/WResource.h>
|
#include <Wt/WResource.h>
|
||||||
#include <Wt/WSplitButton.h>
|
#include <Wt/WSplitButton.h>
|
||||||
|
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "services/scanner/IScannerService.hpp"
|
#include "services/scanner/IScannerService.hpp"
|
||||||
#include "utils/Service.hpp"
|
#include "utils/Service.hpp"
|
||||||
#include "LmsApplication.hpp"
|
#include "LmsApplication.hpp"
|
||||||
|
|||||||
@@ -28,8 +28,8 @@
|
|||||||
#include <Wt/WFormModel.h>
|
#include <Wt/WFormModel.h>
|
||||||
|
|
||||||
#include "services/auth/IPasswordService.hpp"
|
#include "services/auth/IPasswordService.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "utils/IConfig.hpp"
|
#include "utils/IConfig.hpp"
|
||||||
#include "utils/Exception.hpp"
|
#include "utils/Exception.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
#include <Wt/WTemplate.h>
|
#include <Wt/WTemplate.h>
|
||||||
|
|
||||||
#include "services/auth/IPasswordService.hpp"
|
#include "services/auth/IPasswordService.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
#include "utils/Service.hpp"
|
#include "utils/Service.hpp"
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
namespace UserInterface {
|
namespace UserInterface {
|
||||||
|
|
||||||
UsersView::UsersView()
|
UsersView::UsersView()
|
||||||
: Wt::WTemplate(Wt::WString::tr("Lms.Admin.Users.template"))
|
: Wt::WTemplate {Wt::WString::tr("Lms.Admin.Users.template")}
|
||||||
{
|
{
|
||||||
addFunction("tr", &Wt::WTemplate::Functions::tr);
|
addFunction("tr", &Wt::WTemplate::Functions::tr);
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ UsersView::UsersView()
|
|||||||
setCondition("if-can-create-user", true);
|
setCondition("if-can-create-user", true);
|
||||||
|
|
||||||
Wt::WPushButton* addBtn = bindNew<Wt::WPushButton>("add-btn", Wt::WString::tr("Lms.Admin.Users.add"));
|
Wt::WPushButton* addBtn = bindNew<Wt::WPushButton>("add-btn", Wt::WString::tr("Lms.Admin.Users.add"));
|
||||||
addBtn->clicked().connect([]()
|
addBtn->clicked().connect([]
|
||||||
{
|
{
|
||||||
LmsApp->setInternalPath("/admin/user", true);
|
LmsApp->setInternalPath("/admin/user", true);
|
||||||
});
|
});
|
||||||
@@ -69,8 +69,7 @@ UsersView::refreshView()
|
|||||||
|
|
||||||
auto transaction {LmsApp->getDbSession().createSharedTransaction()};
|
auto transaction {LmsApp->getDbSession().createSharedTransaction()};
|
||||||
|
|
||||||
auto users = Database::User::getAll(LmsApp->getDbSession());
|
for (const auto& user : Database::User::getAll(LmsApp->getDbSession()))
|
||||||
for (const auto& user : users)
|
|
||||||
{
|
{
|
||||||
const Database::UserId userId {user->getId()};
|
const Database::UserId userId {user->getId()};
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#include "LoginNameValidator.hpp"
|
#include "LoginNameValidator.hpp"
|
||||||
|
|
||||||
#include <Wt/WLengthValidator.h>
|
#include <Wt/WLengthValidator.h>
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
|
|
||||||
namespace UserInterface
|
namespace UserInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include <functional>
|
#include <functional>
|
||||||
#include <Wt/WValidator.h>
|
#include <Wt/WValidator.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "services/auth/Types.hpp"
|
#include "services/auth/Types.hpp"
|
||||||
|
|
||||||
namespace UserInterface
|
namespace UserInterface
|
||||||
|
|||||||
@@ -19,9 +19,9 @@
|
|||||||
|
|
||||||
#include "ArtistCollector.hpp"
|
#include "ArtistCollector.hpp"
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "database/TrackList.hpp"
|
#include "services/database/TrackList.hpp"
|
||||||
#include "services/scrobbling/IScrobblingService.hpp"
|
#include "services/scrobbling/IScrobblingService.hpp"
|
||||||
#include "utils/Service.hpp"
|
#include "utils/Service.hpp"
|
||||||
#include "Filters.hpp"
|
#include "Filters.hpp"
|
||||||
|
|||||||
@@ -23,8 +23,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "DatabaseCollectorBase.hpp"
|
#include "DatabaseCollectorBase.hpp"
|
||||||
|
#include "services/database/Types.hpp"
|
||||||
#include "database/Types.hpp"
|
|
||||||
|
|
||||||
namespace Database
|
namespace Database
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#include <Wt/WAnchor.h>
|
#include <Wt/WAnchor.h>
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "LmsApplication.hpp"
|
#include "LmsApplication.hpp"
|
||||||
|
|
||||||
namespace UserInterface::ArtistListHelpers
|
namespace UserInterface::ArtistListHelpers
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include <Wt/WTemplate.h>
|
#include <Wt/WTemplate.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace Database
|
namespace Database
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -25,13 +25,13 @@
|
|||||||
#include <Wt/WTemplate.h>
|
#include <Wt/WTemplate.h>
|
||||||
#include <Wt/WText.h>
|
#include <Wt/WText.h>
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Cluster.hpp"
|
#include "services/database/Cluster.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/ScanSettings.hpp"
|
#include "services/database/ScanSettings.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "services/recommendation/IRecommendationService.hpp"
|
#include "services/recommendation/IRecommendationService.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
#include "utils/String.hpp"
|
#include "utils/String.hpp"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include <Wt/WSignal.h>
|
#include <Wt/WSignal.h>
|
||||||
#include <Wt/WTemplate.h>
|
#include <Wt/WTemplate.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "PlayQueueAction.hpp"
|
#include "PlayQueueAction.hpp"
|
||||||
|
|
||||||
namespace Database
|
namespace Database
|
||||||
|
|||||||
@@ -21,8 +21,8 @@
|
|||||||
|
|
||||||
#include <Wt/WMenu.h>
|
#include <Wt/WMenu.h>
|
||||||
|
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/TrackArtistLink.hpp"
|
#include "services/database/TrackArtistLink.hpp"
|
||||||
#include "utils/EnumSet.hpp"
|
#include "utils/EnumSet.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include <Wt/WComboBox.h>
|
#include <Wt/WComboBox.h>
|
||||||
#include <Wt/WTemplate.h>
|
#include <Wt/WTemplate.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "ArtistCollector.hpp"
|
#include "ArtistCollector.hpp"
|
||||||
|
|
||||||
namespace UserInterface
|
namespace UserInterface
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
namespace UserInterface
|
namespace UserInterface
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,10 +23,10 @@
|
|||||||
#include <Wt/WTemplate.h>
|
#include <Wt/WTemplate.h>
|
||||||
#include <Wt/WText.h>
|
#include <Wt/WText.h>
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/Track.hpp"
|
#include "services/database/Track.hpp"
|
||||||
#include "utils/Logger.hpp"
|
#include "utils/Logger.hpp"
|
||||||
|
|
||||||
#include "LmsApplication.hpp"
|
#include "LmsApplication.hpp"
|
||||||
|
|||||||
@@ -21,32 +21,30 @@
|
|||||||
|
|
||||||
#include <Wt/WTemplate.h>
|
#include <Wt/WTemplate.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
#include "PlayQueueAction.hpp"
|
#include "PlayQueueAction.hpp"
|
||||||
|
|
||||||
namespace UserInterface {
|
namespace UserInterface
|
||||||
|
|
||||||
class Filters;
|
|
||||||
class SearchView;
|
|
||||||
|
|
||||||
class Explore : public Wt::WTemplate
|
|
||||||
{
|
{
|
||||||
public:
|
class Filters;
|
||||||
Explore(Filters* filters);
|
class SearchView;
|
||||||
|
|
||||||
void search(const Wt::WString& searchText);
|
class Explore : public Wt::WTemplate
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Explore(Filters* filters);
|
||||||
|
|
||||||
PlayQueueActionTrackSignal tracksAction;
|
void search(const Wt::WString& searchText);
|
||||||
|
|
||||||
private:
|
PlayQueueActionTrackSignal tracksAction;
|
||||||
|
|
||||||
void handleArtistsAction(PlayQueueAction action, const std::vector<Database::ArtistId>& artistsId);
|
private:
|
||||||
void handleReleasesAction(PlayQueueAction action, const std::vector<Database::ReleaseId>& releasesId);
|
void handleArtistsAction(PlayQueueAction action, const std::vector<Database::ArtistId>& artistsId);
|
||||||
void handleTracksAction(PlayQueueAction action, const std::vector<Database::TrackId>& tracksId);
|
void handleReleasesAction(PlayQueueAction action, const std::vector<Database::ReleaseId>& releasesId);
|
||||||
|
void handleTracksAction(PlayQueueAction action, const std::vector<Database::TrackId>& tracksId);
|
||||||
Filters* _filters {};
|
|
||||||
SearchView* _search {};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
Filters* _filters {};
|
||||||
|
SearchView* _search {};
|
||||||
|
};
|
||||||
} // namespace UserInterface
|
} // namespace UserInterface
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
#include <Wt/WPushButton.h>
|
#include <Wt/WPushButton.h>
|
||||||
#include <Wt/WTemplate.h>
|
#include <Wt/WTemplate.h>
|
||||||
|
|
||||||
#include "database/Cluster.hpp"
|
#include "services/database/Cluster.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
|
|
||||||
#include "LmsApplication.hpp"
|
#include "LmsApplication.hpp"
|
||||||
|
|
||||||
|
|||||||
@@ -24,31 +24,27 @@
|
|||||||
#include <Wt/WSignal.h>
|
#include <Wt/WSignal.h>
|
||||||
#include <Wt/WTemplate.h>
|
#include <Wt/WTemplate.h>
|
||||||
|
|
||||||
#include "database/Types.hpp"
|
#include "services/database/Types.hpp"
|
||||||
|
|
||||||
#include "Filters.hpp"
|
#include "Filters.hpp"
|
||||||
|
|
||||||
namespace UserInterface {
|
namespace UserInterface
|
||||||
|
|
||||||
class Filters : public Wt::WTemplate
|
|
||||||
{
|
{
|
||||||
public:
|
class Filters : public Wt::WTemplate
|
||||||
Filters();
|
{
|
||||||
|
public:
|
||||||
|
Filters();
|
||||||
|
|
||||||
void add(Database::ClusterId clusterId);
|
void add(Database::ClusterId clusterId);
|
||||||
|
const std::vector<Database::ClusterId>& getClusterIds() const { return _clusterIds; }
|
||||||
|
Wt::Signal<>& updated() { return _sigUpdated; }
|
||||||
|
|
||||||
const std::vector<Database::ClusterId>& getClusterIds() const { return _clusterIds; }
|
private:
|
||||||
|
void showDialog();
|
||||||
Wt::Signal<>& updated() { return _sigUpdated; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
void showDialog();
|
|
||||||
|
|
||||||
Wt::WContainerWidget *_filters;
|
|
||||||
Wt::Signal<> _sigUpdated;
|
|
||||||
std::vector<Database::ClusterId> _clusterIds;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
Wt::WContainerWidget *_filters;
|
||||||
|
Wt::Signal<> _sigUpdated;
|
||||||
|
std::vector<Database::ClusterId> _clusterIds;
|
||||||
|
};
|
||||||
} // namespace UserInterface
|
} // namespace UserInterface
|
||||||
|
|
||||||
|
|||||||
@@ -21,10 +21,10 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "database/Session.hpp"
|
#include "services/database/Session.hpp"
|
||||||
#include "database/User.hpp"
|
#include "services/database/User.hpp"
|
||||||
#include "database/TrackList.hpp"
|
#include "services/database/TrackList.hpp"
|
||||||
#include "services/scrobbling/IScrobblingService.hpp"
|
#include "services/scrobbling/IScrobblingService.hpp"
|
||||||
#include "utils/Service.hpp"
|
#include "utils/Service.hpp"
|
||||||
#include "Filters.hpp"
|
#include "Filters.hpp"
|
||||||
|
|||||||
@@ -23,8 +23,8 @@
|
|||||||
#include <Wt/WImage.h>
|
#include <Wt/WImage.h>
|
||||||
#include <Wt/WText.h>
|
#include <Wt/WText.h>
|
||||||
|
|
||||||
#include "database/Artist.hpp"
|
#include "services/database/Artist.hpp"
|
||||||
#include "database/Release.hpp"
|
#include "services/database/Release.hpp"
|
||||||
#include "resource/CoverResource.hpp"
|
#include "resource/CoverResource.hpp"
|
||||||
|
|
||||||
#include "LmsApplication.hpp"
|
#include "LmsApplication.hpp"
|
||||||
@@ -33,7 +33,6 @@ using namespace Database;
|
|||||||
|
|
||||||
namespace UserInterface::ReleaseListHelpers
|
namespace UserInterface::ReleaseListHelpers
|
||||||
{
|
{
|
||||||
|
|
||||||
static
|
static
|
||||||
std::unique_ptr<Wt::WTemplate>
|
std::unique_ptr<Wt::WTemplate>
|
||||||
createEntryInternal(const Release::pointer& release, const std::string& templateKey, const Artist::pointer& artist, const bool showYear)
|
createEntryInternal(const Release::pointer& release, const std::string& templateKey, const Artist::pointer& artist, const bool showYear)
|
||||||
@@ -104,6 +103,5 @@ namespace UserInterface::ReleaseListHelpers
|
|||||||
{
|
{
|
||||||
return createEntry(release, artist, true);
|
return createEntry(release, artist, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace UserInterface
|
} // namespace UserInterface
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user