Fixed regression on artist/release artist handling + fixed bug when firing a signal on still connected but deleted listener

This commit is contained in:
emeric
2020-11-12 17:12:08 +01:00
parent 6a4bbd6acf
commit 6240ccf747
20 changed files with 81 additions and 49 deletions
+3 -2
View File
@@ -509,12 +509,13 @@ Track::getArtists(EnumSet<TrackArtistLinkType> linkTypes) const
oss << ")";
}
Wt::Dbo::Query<Artist::pointer> query {session()->query<Artist::pointer>(oss.str())
.where("t.id = ?").bind(self()->id())};
Wt::Dbo::Query<Artist::pointer> query {session()->query<Artist::pointer>(oss.str())};
for (TrackArtistLinkType type : linkTypes)
query.bind(type);
query.where("t.id = ?").bind(self()->id());
Wt::Dbo::collection<Artist::pointer> res = query;
return std::vector<Artist::pointer>(std::begin(res), std::end(res));
}
+2 -1
View File
@@ -132,8 +132,9 @@ class User : public Wt::Dbo::Dbo<User>
// Do not change enum values!
enum class SubsonicArtistListMode
{
AllArtists = 0,
AllArtists = 0,
ReleaseArtists = 1,
TrackArtists = 2,
};
static inline const std::size_t MinNameLength {3};