fix: remove favorite tracks whose values are None when getting favs

+ sync is_fav state when populating
This commit is contained in:
geoffrey45
2023-01-24 02:10:58 +03:00
parent 22fa3eef40
commit 29e61b31c3
6 changed files with 46 additions and 23 deletions
+1 -2
View File
@@ -40,7 +40,7 @@ class Store:
cls.tracks = list(tdb.get_all_tracks())
fav_hashes = favdb.get_fav_tracks()
fav_hashes = [t[1] for t in fav_hashes]
fav_hashes = " ".join([t[1] for t in fav_hashes])
for track in tqdm(cls.tracks, desc="Loading tracks"):
if track.trackhash in fav_hashes:
@@ -225,7 +225,6 @@ class Store:
cls.folders.append(folder)
@classmethod
def get_folder(cls, path: str): # type: ignore
"""