👷 Exception handling on missing lyrics adjusted due to tidalapi breaking changes. Fixes #92
This commit is contained in:
@@ -144,10 +144,7 @@ class Download:
|
|||||||
# TODO: Handle Exception...
|
# TODO: Handle Exception...
|
||||||
self.fn_logger(e)
|
self.fn_logger(e)
|
||||||
|
|
||||||
# Check if file is encrypted.
|
if stream_manifest.is_encrypted:
|
||||||
needs_decryption = self.is_encrypted(stream_manifest.encryption_type)
|
|
||||||
|
|
||||||
if needs_decryption:
|
|
||||||
key, nonce = decrypt_security_token(stream_manifest.encryption_key)
|
key, nonce = decrypt_security_token(stream_manifest.encryption_key)
|
||||||
tmp_path_file_decrypted = path_file + "_decrypted"
|
tmp_path_file_decrypted = path_file + "_decrypted"
|
||||||
decrypt_file(path_file, tmp_path_file_decrypted, key, nonce)
|
decrypt_file(path_file, tmp_path_file_decrypted, key, nonce)
|
||||||
@@ -289,7 +286,7 @@ class Download:
|
|||||||
lyrics = lyrics_obj.subtitles
|
lyrics = lyrics_obj.subtitles
|
||||||
elif lyrics_obj.text:
|
elif lyrics_obj.text:
|
||||||
lyrics = lyrics_obj.text
|
lyrics = lyrics_obj.text
|
||||||
except (HTTPError, AttributeError):
|
except:
|
||||||
lyrics = ""
|
lyrics = ""
|
||||||
# TODO: Implement proper logging.
|
# TODO: Implement proper logging.
|
||||||
print(f"Could not retrieve lyrics for `{name_builder_item(track)}`.")
|
print(f"Could not retrieve lyrics for `{name_builder_item(track)}`.")
|
||||||
|
|||||||
Reference in New Issue
Block a user