From a7dd659e22bbb9158578e47390a5c64cb2c545aa Mon Sep 17 00:00:00 2001 From: RemixDev Date: Fri, 16 Jul 2021 14:55:11 +0200 Subject: [PATCH] Added better error reporting for generation in cli --- deemix/__main__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/deemix/__main__.py b/deemix/__main__.py index 0910e3f..f506dbb 100644 --- a/deemix/__main__.py +++ b/deemix/__main__.py @@ -10,6 +10,7 @@ from deemix.settings import load as loadSettings from deemix.utils import getBitrateNumberFromText import deemix.utils.localpaths as localpaths from deemix.downloader import Downloader +from deemix.itemgen import GenerationError from deemix.plugins.spotify import Spotify class LogListener: @@ -65,7 +66,11 @@ def download(url, bitrate, portable, path): links.append(link) for link in links: - downloadObject = generateDownloadObject(dz, link, bitrate, plugins, listener) + try: + downloadObject = generateDownloadObject(dz, link, bitrate, plugins, listener) + except GenerationError as e: + print(f"{e.link}: {e.message}") + continue if isinstance(downloadObject, list): for obj in downloadObject: Downloader(dz, obj, settings, listener).start()