Compare commits

..

No commits in common. '2ff9dceb28734fc53447d03620f51bc06fd69c17' and '21b860740632e64db8721384ba372439d1d11269' have entirely different histories.

  1. 10
      config.example.toml
  2. 2
      src/adb.py
  3. 4
      src/metadata.py

@ -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 ripping audio with alac codec, the ripped file name is: # When transcribing audio with alac codec, the transcribed file name is:
# 1-01 名もなき何もかも [ALAC][16bit][44.1kHz] # 1-01 名もなき何もかも [ALAC][16bit][44.1kHz]
# When ripping audio with other codecs, the ripped file name is: # When transcribing audio with other codecs, the transcribed 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, album_created # song_id, album_id
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, album_created # genre, created, track, tracknum, disk,
# 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, album_created # song_id, album_id
playlistSongNameFormat = "{playlistSongIndex:02d}. {artist} - {title}" playlistSongNameFormat = "{playlistSongIndex:02d}. {artist} - {title}"
# Save lyrics as .lrc file # Save lyrics as .lrc file
saveLyrics = true saveLyrics = true

@ -114,7 +114,7 @@ class Device:
self.fridaDevice = frida.get_device_manager().get_device(self.device.serial) self.fridaDevice = frida.get_device_manager().get_device(self.device.serial)
self.pid = self.fridaDevice.spawn("com.apple.android.music") self.pid = self.fridaDevice.spawn("com.apple.android.music")
self.fridaSession = self.fridaDevice.attach(self.pid) self.fridaSession = self.fridaDevice.attach(self.pid)
with open("m3u8_sv.js", "r") as f: with open("m3u8.js", "r") as f:
m3u8_script = f.read() m3u8_script = f.read()
self.m3u8Script = self.fridaSession.create_script(m3u8_script) self.m3u8Script = self.fridaSession.create_script(m3u8_script)
self.m3u8Script.load() self.m3u8Script.load()

@ -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", "album_created"] "sample_rate_kHz", "song_id", "album_id"]
class SongMetadata(BaseModel): class SongMetadata(BaseModel):
@ -17,7 +17,6 @@ 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
@ -69,7 +68,6 @@ 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
) )

Loading…
Cancel
Save