Skip to content

Commit

Permalink
Added option to ignore all deemix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalec committed Mar 3, 2023
1 parent 80b7b48 commit c782df5
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion deemon/cmd/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import deemix.errors
import deezer
from deezer import errors
import plexapi.exceptions
from plexapi.server import PlexServer

Expand Down Expand Up @@ -199,8 +200,22 @@ def download_queue(self, queue_list: list = None):
else:
logger.info(f" > {item.playlist_title} (playlist)...")
self.di.download_url([item.url], dx_bitrate, download_path, override_deemix=True)
except deemix.errors.GenerationError:
except (deemix.errors.GenerationError, errors.WrongGeolocation) as e:
logger.debug(e)
failed_count.append([(item, "No tracks listed or unavailable in your country")])
except Exception as e:
if config.halt_download_on_error():
raise e
else:
if item.artist_name and item.album_title:
logger.info(f"The following error occured while downloading {item.artist_name} - {item.album_title}: {e}")
elif item.artist_name and item.track_title:
logger.info(f"The following error occured while downloading {item.artist_name} - {item.track_title}: {e}")
else:
logger.info(f"The following error occured while downloading {item.playlist_title}: {e}")
pass


failed_count = [x for x in failed_count if x]

print("")
Expand Down

0 comments on commit c782df5

Please sign in to comment.