mirror of
https://github.com/WorldObservationLog/AppleMusicDecrypt.git
synced 2026-01-15 14:22:54 -03:00
Merge remote-tracking branch 'origin/v2' into v2
Some checks failed
/ Build Windows (push) Has been cancelled
Some checks failed
/ Build Windows (push) Has been cancelled
This commit is contained in:
@@ -11,7 +11,7 @@ pd i debian
|
||||
## Step 2: Deploy AppleMusicDecrypt
|
||||
Enter the Debian environment(`pd login debian`)
|
||||
```shell
|
||||
apt update && apt install pipx && pipx install poetry && pipx ensurepath && source ~/.bashrc
|
||||
apt update && apt install pipx git -y && pipx install poetry && pipx ensurepath && source ~/.bashrc
|
||||
git clone https://github.com/WorldObservationLog/AppleMusicDecrypt
|
||||
cd AppleMusicDecrypt
|
||||
bash ./tools/install-deps.sh
|
||||
@@ -34,3 +34,12 @@ playlistDirPathFormat = "/sdcard/Music/playlists/{playlistName}"
|
||||
```
|
||||
## Step 4: Run AppleMusicDecrypt
|
||||
`poetry run python main.py`
|
||||
## Update AppleMusicDecrypt
|
||||
```shell
|
||||
pd login debian
|
||||
cd AppleMusicDecrypt
|
||||
git checkout -f && git pull
|
||||
poetry update
|
||||
cp config.example.toml config.toml
|
||||
nano config.toml
|
||||
```
|
||||
|
||||
@@ -21,7 +21,8 @@ def save(song: bytes, codec: str, metadata: SongMetadata, playlist: PlaylistInfo
|
||||
with open(cover_path.absolute(), "wb") as f:
|
||||
f.write(metadata.cover)
|
||||
if it(Config).download.saveLyrics and metadata.lyrics:
|
||||
lrc = ttml_convent_to_lrc(metadata.lyrics)
|
||||
if lrc:
|
||||
lrc_path = dir_path / Path(song_name + ".lrc")
|
||||
with open(lrc_path.absolute(), "w", encoding="utf-8") as f:
|
||||
f.write(ttml_convent_to_lrc(metadata.lyrics))
|
||||
lrc_path.write_text(lrc, encoding="utf-8")
|
||||
return song_path.absolute()
|
||||
|
||||
@@ -96,7 +96,8 @@ def ttml_convent_to_lrc(ttml: str) -> str:
|
||||
h, m, s, ms = 0, 0, 0, 0
|
||||
lyric_time: str = lyric.get("begin")
|
||||
if not lyric_time:
|
||||
raise NotTimeSyncedLyricsException
|
||||
return ""
|
||||
#raise NotTimeSyncedLyricsException
|
||||
if lyric_time.find('.') == -1:
|
||||
lyric_time += '.000'
|
||||
match lyric_time.count(":"):
|
||||
|
||||
Reference in New Issue
Block a user