From 7aa1e13b8abb7411321f2403b45dda7cb5d638aa Mon Sep 17 00:00:00 2001 From: zhaarey <157944548+zhaarey@users.noreply.github.com> Date: Sun, 5 May 2024 22:39:46 +0800 Subject: [PATCH] set only ALAC need check API --- src/rip.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rip.py b/src/rip.py index 478a4e0..a4a80a6 100644 --- a/src/rip.py +++ b/src/rip.py @@ -31,14 +31,14 @@ async def rip_song(song: Song, auth_params: GlobalAuthParams, codec: str, config lyrics = await get_song_lyrics(song.id, song.storefront, auth_params.accountAccessToken, auth_params.dsid, auth_params.accountToken, config.region.language) song_metadata.lyrics = lyrics - if "http" in config.download.check: + if "http" in config.download.check and codec == Codec.ALAC: params = ( ('songid', song.id), ) - m3u8_url = httpx.get(config.download.check, params=params).text + m3u8_url = httpx.get(config.download.check, params=params, verify=False).text if "m3u8" in m3u8_url: song_data.attributes.extendedAssetUrls.enhancedHls = m3u8_url - logger.info("Find m3u8 from API") + logger.info("Found m3u8 from API") if specified_m3u8: song_uri, keys = await extract_media(specified_m3u8, codec, song_metadata, config.download.codecPriority, config.download.codecAlternative)