mirror of
https://github.com/zhaarey/AppleMusicDecrypt.git
synced 2025-10-23 15:11:06 +00:00
fix: raise exception when lossless audio is missing
This commit is contained in:
@@ -57,6 +57,9 @@ async def rip_song(song: Song, auth_params: GlobalAuthParams, codec: str, config
|
|||||||
elif not m3u8_url and config.m3u8Api.force:
|
elif not m3u8_url and config.m3u8Api.force:
|
||||||
logger.error(f"Failed to get m3u8 from API for song: {song_metadata.artist} - {song_metadata.title}")
|
logger.error(f"Failed to get m3u8 from API for song: {song_metadata.artist} - {song_metadata.title}")
|
||||||
return
|
return
|
||||||
|
if not specified_m3u8 and not song_data.attributes.extendedAssetUrls.enhancedHls:
|
||||||
|
logger.error(f"Failed to download song: {song_metadata.artist} - {song_metadata.title} cause lossless audio does not exist")
|
||||||
|
return
|
||||||
if specified_m3u8:
|
if specified_m3u8:
|
||||||
song_uri, keys, codec_id = await extract_media(specified_m3u8, codec, song_metadata,
|
song_uri, keys, codec_id = await extract_media(specified_m3u8, codec, song_metadata,
|
||||||
config.download.codecPriority,
|
config.download.codecPriority,
|
||||||
|
|||||||
Reference in New Issue
Block a user