Fix audio track validation in AppleMusicDownloader

This commit is contained in:
Rafael Moraes
2025-12-05 01:05:44 -03:00
parent 1ceb7fcf46
commit f19ef4d6dd
+8 -5
View File
@@ -447,11 +447,14 @@ class AppleMusicDownloader:
):
raise ExecutableNotFound("N_m3u8DL-RE")
if (
not download_item.decryption_key
or not download_item.decryption_key.audio_track
or not download_item.decryption_key.audio_track.key
) and not self.base_downloader.use_wrapper:
if not download_item.stream_info.audio_track or (
(
not download_item.decryption_key
or not download_item.decryption_key.audio_track
or not download_item.decryption_key.audio_track.key
)
and not self.base_downloader.use_wrapper
):
raise FormatNotAvailable(download_item.media_metadata["id"])
if download_item.media_metadata["type"] in SONG_MEDIA_TYPE: