remove dups from get_tracks_by_albumhash

This commit is contained in:
geoffrey45
2023-03-27 04:35:49 +03:00
parent 805df18ac3
commit c465116f3d
3 changed files with 283 additions and 298 deletions
+2 -1
View File
@@ -123,7 +123,8 @@ class TrackStore:
"""
Returns all tracks matching the given album hash.
"""
return [t for t in cls.tracks if t.albumhash == album_hash]
tracks = [t for t in cls.tracks if t.albumhash == album_hash]
return remove_duplicates(tracks)
@classmethod
def get_tracks_by_artist(cls, artisthash: str) -> list[Track]: