Associate user provided images with playlists (using EXTIMG or same named file), fixes #833
This commit is contained in:
@@ -35,7 +35,7 @@ namespace lms::db
|
||||
{
|
||||
namespace
|
||||
{
|
||||
static constexpr Version LMS_DATABASE_VERSION{ 104 };
|
||||
static constexpr Version LMS_DATABASE_VERSION{ 105 };
|
||||
}
|
||||
|
||||
VersionInfo::VersionInfo()
|
||||
@@ -1723,6 +1723,12 @@ FROM track)");
|
||||
utils::executeCommand(*session.getDboSession(), "ALTER TABLE scan_settings ADD COLUMN musicnn_model_identifier TEXT NOT NULL DEFAULT ''");
|
||||
}
|
||||
|
||||
void migrateFromV104(Session& session)
|
||||
{
|
||||
utils::executeCommand(*session.getDboSession(), R"(ALTER TABLE "playlist_file" ADD COLUMN "preferred_artwork_id" bigint)");
|
||||
utils::executeCommand(*session.getDboSession(), R"(ALTER TABLE "playlist_file" ADD COLUMN "cover_image_file" text NOT NULL DEFAULT '')");
|
||||
}
|
||||
|
||||
bool doDbMigration(Session& session)
|
||||
{
|
||||
constexpr std::string_view outdatedMsg{ "Outdated database, please rebuild it (delete the .db file and restart)" };
|
||||
@@ -1803,6 +1809,7 @@ FROM track)");
|
||||
{ 101, migrateFromV101 },
|
||||
{ 102, migrateFromV102 },
|
||||
{ 103, migrateFromV103 },
|
||||
{ 104, migrateFromV104 },
|
||||
};
|
||||
|
||||
bool migrationPerformed{};
|
||||
|
||||
Reference in New Issue
Block a user