Handle request exceptions

This commit is contained in:
vitiko98 2020-12-18 13:22:12 -04:00
parent 3919984a75
commit 17c8ff5ece
2 changed files with 15 additions and 12 deletions

View File

@ -96,6 +96,7 @@ class QobuzDL:
).group(1) ).group(1)
def download_from_id(self, item_id, album=True, alt_path=None): def download_from_id(self, item_id, album=True, alt_path=None):
try:
downloader.download_id_by_type( downloader.download_id_by_type(
self.client, self.client,
item_id, item_id,
@ -107,6 +108,8 @@ class QobuzDL:
self.quality_fallback, self.quality_fallback,
self.cover_og_quality, self.cover_og_quality,
) )
except requests.exceptions.RequestException as e:
logger.error(f"Error getting release: {e}")
def handle_url(self, url): def handle_url(self, url):
possibles = { possibles = {

View File

@ -13,7 +13,7 @@ requirements = read_file("requirements.txt").strip().split()
setup( setup(
name=pkg_name, name=pkg_name,
version="0.7.1", version="0.7.2",
author="Vitiko", author="Vitiko",
author_email="vhnz98@gmail.com", author_email="vhnz98@gmail.com",
description="The complete Lossless and Hi-Res music downloader for Qobuz", description="The complete Lossless and Hi-Res music downloader for Qobuz",