rewrite populate.get_image() to extract a

track thumbnail from the first track in an album that has one.

+ rewrite Populate.remove_modified with sets
+ clean the SqliteManager utility class
+ Rewrite ProcessTrackThumbnails to use a process pool instead of a thread pool
+ rewrite track store's  remove_tracks_by_filepaths to utilize sets
This commit is contained in:
mungai-njoroge
2023-06-21 09:20:56 +03:00
parent 1eac009fde
commit 9d4f7af581
7 changed files with 78 additions and 61 deletions
+2 -3
View File
@@ -53,15 +53,14 @@ class TrackStore:
break
@classmethod
def remove_tracks_by_filepaths(cls, filepaths: list[str]):
def remove_tracks_by_filepaths(cls, filepaths: set[str]):
"""
Removes multiple tracks from the store by their filepaths.
"""
paths_str = "~".join(filepaths)
for track in cls.tracks:
if track.filepath in paths_str:
if track.filepath in filepaths:
cls.tracks.remove(track)
@classmethod