Display disc subtitles if it is set, even for single disc releases, fixes #492

This commit is contained in:
emeric
2024-07-27 18:03:58 +02:00
parent a2a2041f49
commit 9bca05fb51
3 changed files with 11 additions and 2 deletions
+5
View File
@@ -514,6 +514,11 @@ namespace lms::db
return getArtists().size() > 1;
}
bool Release::hasDiscSubtitle() const
{
return utils::fetchQuerySingleResult(session()->query<int>("SELECT EXISTS (SELECT 1 FROM track WHERE disc_subtitle IS NOT NULL AND disc_subtitle <> '' AND release_id = ?)").bind(getId()));
}
std::size_t Release::getTrackCount() const
{
assert(session());
@@ -218,6 +218,7 @@ namespace lms::db
std::vector<ObjectPtr<Artist>> getReleaseArtists() const { return getArtists(TrackArtistLinkType::ReleaseArtist); }
bool hasVariousArtists() const;
std::vector<pointer> getSimilarReleases(std::optional<std::size_t> offset = {}, std::optional<std::size_t> count = {}) const;
bool hasDiscSubtitle() const;
template<class Action>
void persist(Action& a)