mirror of
https://github.com/zhaarey/AppleMusicDecrypt.git
synced 2025-10-23 15:11:06 +00:00
@@ -20,6 +20,7 @@ saveLyrics = true
|
|||||||
saveCover = true
|
saveCover = true
|
||||||
coverFormat = "jpg"
|
coverFormat = "jpg"
|
||||||
afterDownloaded = ""
|
afterDownloaded = ""
|
||||||
|
check = ""
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
embedMetadata = ["title", "artist", "album", "album_artist", "composer",
|
embedMetadata = ["title", "artist", "album", "album_artist", "composer",
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ class Download(BaseModel):
|
|||||||
saveCover: bool
|
saveCover: bool
|
||||||
coverFormat: str
|
coverFormat: str
|
||||||
afterDownloaded: str
|
afterDownloaded: str
|
||||||
|
check: str
|
||||||
|
|
||||||
|
|
||||||
class Metadata(BaseModel):
|
class Metadata(BaseModel):
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import httpx
|
||||||
|
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
|
|
||||||
@@ -30,6 +31,12 @@ async def rip_song(song: Song, auth_params: GlobalAuthParams, codec: str, config
|
|||||||
lyrics = await get_song_lyrics(song.id, song.storefront, auth_params.accountAccessToken,
|
lyrics = await get_song_lyrics(song.id, song.storefront, auth_params.accountAccessToken,
|
||||||
auth_params.dsid, auth_params.accountToken, config.region.language)
|
auth_params.dsid, auth_params.accountToken, config.region.language)
|
||||||
song_metadata.lyrics = lyrics
|
song_metadata.lyrics = lyrics
|
||||||
|
if "http" in config.download.check:
|
||||||
|
params = (
|
||||||
|
('songid', song.id),
|
||||||
|
)
|
||||||
|
song_data.attributes.extendedAssetUrls.enhancedHls = httpx.get(config.download.check, params=params).text
|
||||||
|
logger.info("Find m3u8 from API")
|
||||||
if specified_m3u8:
|
if specified_m3u8:
|
||||||
song_uri, keys = await extract_media(specified_m3u8, codec, song_metadata,
|
song_uri, keys = await extract_media(specified_m3u8, codec, song_metadata,
|
||||||
config.download.codecPriority, config.download.codecAlternative)
|
config.download.codecPriority, config.download.codecAlternative)
|
||||||
|
|||||||
Reference in New Issue
Block a user