WIP
This commit is contained in:
@@ -171,13 +171,13 @@ getQuery(Session& session,
|
||||
}
|
||||
|
||||
std::vector<Artist::pointer>
|
||||
Artist::getByClusters(Session& session, const std::set<IdType>& clusters)
|
||||
Artist::getByClusters(Session& session, const std::set<IdType>& clusters, NameSortMethod sortMethod)
|
||||
{
|
||||
assert(!clusters.empty());
|
||||
|
||||
session.checkSharedLocked();
|
||||
bool more;
|
||||
return getByFilter(session, clusters, {}, {}, {}, {}, more);
|
||||
return getByFilter(session, clusters, {}, {}, sortMethod, {}, {}, more);
|
||||
}
|
||||
|
||||
std::vector<Artist::pointer>
|
||||
@@ -185,6 +185,7 @@ Artist::getByFilter(Session& session,
|
||||
const std::set<IdType>& clusters,
|
||||
const std::vector<std::string>& keywords,
|
||||
std::optional<TrackArtistLink::Type> linkType,
|
||||
NameSortMethod sortMethod,
|
||||
std::optional<std::size_t> offset,
|
||||
std::optional<std::size_t> size,
|
||||
bool& moreResults)
|
||||
@@ -405,6 +406,7 @@ void
|
||||
Artist::setSortName(const std::string& sortName)
|
||||
{
|
||||
_sortName = std::string(sortName, 0 , _maxNameLength);
|
||||
LMS_LOG(DB, DEBUG) << "SORT NAME = '" << _sortName << "'";
|
||||
}
|
||||
|
||||
} // namespace Database
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
namespace Database {
|
||||
|
||||
#define LMS_DATABASE_VERSION 14
|
||||
#define LMS_DATABASE_VERSION 15
|
||||
|
||||
using Version = std::size_t;
|
||||
|
||||
@@ -163,6 +163,12 @@ CREATE TABLE IF NOT EXISTS "track_bookmark" (
|
||||
// Just increment the scan version of the settings to make the next scheduled scan rescan everything
|
||||
ScanSettings::get(*this).modify()->incScanVersion();
|
||||
}
|
||||
else if (version == 14)
|
||||
{
|
||||
// SortName now set from metadata
|
||||
// Just increment the scan version of the settings to make the next scheduled scan rescan everything
|
||||
ScanSettings::get(*this).modify()->incScanVersion();
|
||||
}
|
||||
else
|
||||
{
|
||||
LMS_LOG(DB, ERROR) << "Database version " << version << " cannot be handled using migration";
|
||||
|
||||
Reference in New Issue
Block a user