mirror of
https://github.com/zhaarey/AppleMusicDecrypt.git
synced 2025-10-23 15:11:06 +00:00
fix: #15
This commit is contained in:
@@ -51,20 +51,20 @@ atmosConventToM4a = true
|
|||||||
# For example:
|
# For example:
|
||||||
# audioInfoFormat = " [{codec}][{bit_depth}bit][{sample_rate_kHz}kHz]"
|
# audioInfoFormat = " [{codec}][{bit_depth}bit][{sample_rate_kHz}kHz]"
|
||||||
# songNameFormat = "{disk}-{tracknum:02d} {title}{audio_info}"
|
# songNameFormat = "{disk}-{tracknum:02d} {title}{audio_info}"
|
||||||
# When transcribing audio with alac codec, the transcribed file name is:
|
# When ripping audio with alac codec, the ripped file name is:
|
||||||
# 1-01 名もなき何もかも [ALAC][16bit][44.1kHz]
|
# 1-01 名もなき何もかも [ALAC][16bit][44.1kHz]
|
||||||
# When transcribing audio with other codecs, the transcribed file name is:
|
# When ripping audio with other codecs, the ripped file name is:
|
||||||
# 1-01 名もなき何もかも
|
# 1-01 名もなき何もかも
|
||||||
audioInfoFormat = ""
|
audioInfoFormat = ""
|
||||||
# Available values:
|
# Available values:
|
||||||
# title, artist, album, album_artist, composer,
|
# title, artist, album, album_artist, composer,
|
||||||
# genre, created, track, tracknum, disk,
|
# genre, created, track, tracknum, disk,
|
||||||
# record_company, upc, isrc, copyright, codec, audio_info
|
# record_company, upc, isrc, copyright, codec, audio_info
|
||||||
# song_id, album_id
|
# song_id, album_id, album_created
|
||||||
songNameFormat = "{disk}-{tracknum:02d} {title}"
|
songNameFormat = "{disk}-{tracknum:02d} {title}"
|
||||||
# Available values:
|
# Available values:
|
||||||
# title, artist, album, album_artist, composer,
|
# title, artist, album, album_artist, composer,
|
||||||
# genre, created, track, tracknum, disk,
|
# genre, created, track, tracknum, disk, album_created
|
||||||
# record_company, upc, isrc, copyright, codec, album_id
|
# record_company, upc, isrc, copyright, codec, album_id
|
||||||
dirPathFormat = "downloads/{album_artist}/{album}"
|
dirPathFormat = "downloads/{album_artist}/{album}"
|
||||||
# Available values:
|
# Available values:
|
||||||
@@ -78,7 +78,7 @@ playlistDirPathFormat = "downloads/playlists/{playlistName}"
|
|||||||
# genre, created, track, tracknum, disk,
|
# genre, created, track, tracknum, disk,
|
||||||
# record_company, upc, isrc, copyright, audio_info
|
# record_company, upc, isrc, copyright, audio_info
|
||||||
# playlistName, playlistCuratorName, playlistSongIndex, codec
|
# playlistName, playlistCuratorName, playlistSongIndex, codec
|
||||||
# song_id, album_id
|
# song_id, album_id, album_created
|
||||||
playlistSongNameFormat = "{playlistSongIndex:02d}. {artist} - {title}"
|
playlistSongNameFormat = "{playlistSongIndex:02d}. {artist} - {title}"
|
||||||
# Save lyrics as .lrc file
|
# Save lyrics as .lrc file
|
||||||
saveLyrics = true
|
saveLyrics = true
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from src.models.song_data import Datum
|
|||||||
from src.utils import ttml_convent_to_lrc
|
from src.utils import ttml_convent_to_lrc
|
||||||
|
|
||||||
NOT_INCLUDED_FIELD = ["cover", "playlistIndex", "bit_depth", "sample_rate",
|
NOT_INCLUDED_FIELD = ["cover", "playlistIndex", "bit_depth", "sample_rate",
|
||||||
"sample_rate_kHz", "song_id", "album_id"]
|
"sample_rate_kHz", "song_id", "album_id", "album_created"]
|
||||||
|
|
||||||
|
|
||||||
class SongMetadata(BaseModel):
|
class SongMetadata(BaseModel):
|
||||||
@@ -17,6 +17,7 @@ class SongMetadata(BaseModel):
|
|||||||
album_id: Optional[str] = None
|
album_id: Optional[str] = None
|
||||||
album_artist: Optional[str] = None
|
album_artist: Optional[str] = None
|
||||||
album: Optional[str] = None
|
album: Optional[str] = None
|
||||||
|
album_created: Optional[str] = None
|
||||||
composer: Optional[str] = None
|
composer: Optional[str] = None
|
||||||
genre: Optional[str] = None
|
genre: Optional[str] = None
|
||||||
created: Optional[str] = None
|
created: Optional[str] = None
|
||||||
@@ -68,6 +69,7 @@ class SongMetadata(BaseModel):
|
|||||||
record_company=song_data.relationships.albums.data[0].attributes.recordLabel,
|
record_company=song_data.relationships.albums.data[0].attributes.recordLabel,
|
||||||
upc=song_data.relationships.albums.data[0].attributes.upc,
|
upc=song_data.relationships.albums.data[0].attributes.upc,
|
||||||
isrc=song_data.attributes.isrc,
|
isrc=song_data.attributes.isrc,
|
||||||
|
album_created=song_data.relationships.albums.data[0].attributes.releaseDate,
|
||||||
rtng=cls._rating(song_data.attributes.contentRating),
|
rtng=cls._rating(song_data.attributes.contentRating),
|
||||||
song_id=song_data.id, album_id=song_data.relationships.albums.data[0].id
|
song_id=song_data.id, album_id=song_data.relationships.albums.data[0].id
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user