Skip to content

Commit

Permalink
Fix regression in 9299fc7
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalec committed Mar 8, 2023
1 parent ea19bb9 commit d11ed4b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
17 changes: 7 additions & 10 deletions deemon/cmd/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __init__(self, artist=None, album=None, track=None, playlist=None,
self.url = f"https://deezer.com/track/{self.track_id}"

if playlist:
self.url = playlist["link"]
self.url = playlist["url"]
self.playlist_title = playlist["title"]


Expand Down Expand Up @@ -204,16 +204,13 @@ def download_queue(self, queue_list: list = None):
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
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:
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
logger.info(f"The following error occured while downloading {item.playlist_title}: {e}")
pass


failed_count = [x for x in failed_count if x]
Expand Down
2 changes: 1 addition & 1 deletion deemon/core/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def get_playlist(query: int):
logger.error(f" [!] API still sending empty response while getting data for playlist ID {query}")
return
return {'id': query, 'title': api_result['title'],
'link': f"https://deezer.com/playlist/{str(api_result['id'])}"}
'url': f"https://deezer.com/playlist/{str(api_result['id'])}"}

@staticmethod
def get_playlist_tracks(query: dict):
Expand Down

0 comments on commit d11ed4b

Please sign in to comment.