From da9e005af286706a0a77513cc272a9901a2436b5 Mon Sep 17 00:00:00 2001 From: akira Date: Fri, 12 Dec 2025 16:57:49 +0800 Subject: [PATCH 1/2] docs: use py3 of pd --- android-deploy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android-deploy.md b/android-deploy.md index 00bb7e3..b99dc90 100644 --- a/android-deploy.md +++ b/android-deploy.md @@ -15,7 +15,7 @@ apt update && apt install pipx git -y && pipx install poetry && pipx ensurepath git clone https://github.com/WorldObservationLog/AppleMusicDecrypt cd AppleMusicDecrypt bash ./tools/install-deps.sh -poetry install +poetry env use /usr/bin/python3 && poetry install cp config.example.toml config.toml nano config.toml ``` From 5af45c02d1c481f832b5e0f2b5f79db841412fb4 Mon Sep 17 00:00:00 2001 From: itouakirai <85016486+itouakirai@users.noreply.github.com> Date: Tue, 30 Dec 2025 19:45:45 +0800 Subject: [PATCH 2/2] Improve lyric translation logic in utils.py Refactor lyric translation handling to support replacement types. --- src/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils.py b/src/utils.py index 2b8b856..00ca7a8 100644 --- a/src/utils.py +++ b/src/utils.py @@ -124,8 +124,11 @@ def ttml_convent(ttml: str) -> str: lrc_lines.append( f"[{str(m + h * 60).rjust(2, '0')}:{str(s).rjust(2, '0')}.{str(int(ms / 10)).rjust(2, '0')}]{lyric.text}") if "translation" in it(Config).download.lyricsExtra and b.tt.head.metadata.iTunesMetadata.translation: + trans_type = b.tt.head.metadata.iTunesMetadata.translation.get("type") for translation in b.tt.head.metadata.iTunesMetadata.translation.children: if lyric.get("itunes:key") == translation.get("for"): + if trans_type == "replacement": + del lrc_lines[-1] lrc_lines.append( f"[{str(m + h * 60).rjust(2, '0')}:{str(s).rjust(2, '0')}.{str(int(ms / 10)).rjust(2, '0')}]{translation.text}") if "pronunciation" in it(Config).download.lyricsExtra and b.tt.head.metadata.iTunesMetadata.transliteration: