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 -2
View File
@@ -84,12 +84,12 @@ class SQLiteTrackMethods:
return None
@staticmethod
def remove_tracks_by_filepaths(filepaths: str | list[str]):
def remove_tracks_by_filepaths(filepaths: str | set[str]):
"""
Removes a track or tracks from the database using their filepaths.
"""
if isinstance(filepaths, str):
filepaths = [filepaths]
filepaths = {filepaths}
with SQLiteManager() as cur:
for filepath in filepaths: