Added release type in UI (artist view)

This commit is contained in:
emeric
2023-04-20 15:29:21 +02:00
parent 1d41a26ead
commit ca09a14780
11 changed files with 185 additions and 107 deletions
@@ -139,6 +139,11 @@ createQuery(Session& session, const Release::FindParameters& params)
query.where(oss.str());
}
if (params.primaryType)
query.where("primary_type = ?").bind(*params.primaryType);
if (!params.secondaryTypes.empty())
query.where("secondary_type = ?").bind(params.secondaryTypes);
switch (params.sortMethod)
{
case ReleaseSortMethod::None:
@@ -61,6 +61,8 @@ class Release : public Object<Release, ReleaseId>
ArtistId artist; // only releases that involved this user
EnumSet<TrackArtistLinkType> trackArtistLinkTypes; // and for these link types
EnumSet<TrackArtistLinkType> excludedTrackArtistLinkTypes; // but not for these link types
std::optional<ReleaseTypePrimary> primaryType; // if, set, matching this primary type
EnumSet<ReleaseTypeSecondary> secondaryTypes; // Matching all this (if any)
FindParameters& setClusters(const std::vector<ClusterId>& _clusters) { clusters = _clusters; return *this; }
FindParameters& setKeywords(const std::vector<std::string_view>& _keywords) { keywords = _keywords; return *this; }