use setters to manipulate artist and playlist objects

This commit is contained in:
geoffrey45
2023-03-26 18:57:25 +03:00
parent 5487dad27b
commit fe6c12d856
6 changed files with 33 additions and 23 deletions
+3 -4
View File
@@ -199,10 +199,9 @@ def get_artist(artisthash: str):
if acount == 0 and tcount < 10:
limit = tcount
artist.trackcount = tcount
artist.albumcount = acount
artist.duration = sum(t.duration for t in tracks)
artist.set_trackcount(tcount)
artist.set_albumcount(acount)
artist.set_duration(sum(t.duration for t in tracks))
artist.is_favorite = favdb.check_is_favorite(artisthash, FavType.artist)