From 8fdbb9127c8c038bb7e828201ece36cda259c147 Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Sat, 20 Apr 2024 16:19:08 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Exception=20handling=20on=20miss?= =?UTF-8?q?ing=20lyrics=20adjusted=20due=20to=20`tidalapi`=20breaking=20ch?= =?UTF-8?q?anges.=20Fixes=20#92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tidal_dl_ng/download.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tidal_dl_ng/download.py b/tidal_dl_ng/download.py index c8c59c2..f098327 100644 --- a/tidal_dl_ng/download.py +++ b/tidal_dl_ng/download.py @@ -144,10 +144,7 @@ class Download: # TODO: Handle Exception... self.fn_logger(e) - # Check if file is encrypted. - needs_decryption = self.is_encrypted(stream_manifest.encryption_type) - - if needs_decryption: + if stream_manifest.is_encrypted: key, nonce = decrypt_security_token(stream_manifest.encryption_key) tmp_path_file_decrypted = path_file + "_decrypted" decrypt_file(path_file, tmp_path_file_decrypted, key, nonce) @@ -289,7 +286,7 @@ class Download: lyrics = lyrics_obj.subtitles elif lyrics_obj.text: lyrics = lyrics_obj.text - except (HTTPError, AttributeError): + except: lyrics = "" # TODO: Implement proper logging. print(f"Could not retrieve lyrics for `{name_builder_item(track)}`.")