fix merge conflict

This commit is contained in:
mungai-njoroge
2024-03-27 08:39:30 +03:00
19 changed files with 161 additions and 12 deletions
+5
View File
@@ -104,6 +104,7 @@ class Populate:
log.error(
"Internet connection lost. Downloading artist images suspended."
)
log.error(e) # REVIEW More informations = good
else:
log.warning(f"No internet connection. Downloading artist images suspended!")
@@ -113,6 +114,7 @@ class Populate:
if has_connection():
try:
print("Attempting to download similar artists...")
FetchSimilarArtistsLastFM(instance_key)
except PopulateCancelledError as e:
log.warn(e)
@@ -135,6 +137,7 @@ class Populate:
unmodified_paths.add(track.filepath)
continue
except (FileNotFoundError, OSError) as e:
log.warning(e) # REVIEW More informations = good
TrackStore.remove_track_obj(track)
remove_tracks_by_filepaths(track.filepath)
@@ -286,6 +289,7 @@ def save_similar_artists(_map: tuple[str, Artist]):
instance_key, artist = _map
if POPULATE_KEY != instance_key:
print("Warning: Populate key changed")
raise PopulateCancelledError(
"'FetchSimilarArtistsLastFM': Populate key changed"
)
@@ -321,6 +325,7 @@ class FetchSimilarArtistsLastFM:
with ThreadPoolExecutor(max_workers=CPU_COUNT) as executor:
try:
print("Processing similar artists")
results = list(
tqdm(
executor.map(save_similar_artists, key_artist_map),