This commit is contained in:
2025-05-09 20:59:19 +08:00
parent 177d7e1cdb
commit 8f864c191e
2 changed files with 4 additions and 2 deletions

View File

@@ -1,5 +1,7 @@
import xml.etree.ElementTree as ET
PLUS = "+"
EMPTY = ""
def parse_music_xml(file_path):
# 解析 XML 文件
@@ -36,7 +38,7 @@ def parse_music_xml(file_path):
note_infos.append({
"designer": designer,
"level": f"{level}.{level_decimal}",
"levelshow": f"{level}{"+" if level_decimal > "6" else ""}",
"levelshow": f"{level}{PLUS if int(level_decimal) > 6 else EMPTY}",
})
return music_name, artist_name, note_infos

View File

@@ -24,7 +24,7 @@ def dat_to_mp4(dat_file: str):
""" 将 .dat 文件当作 .usm 文件处理,提取并转换为 .mp4 """
dat_path = Path(dat_file).resolve()
base_name = dat_path.stem
work_dir = dat_path.parent / "work"
work_dir = dat_path.parent / "work" / "pv"
usm_path = work_dir / f"{base_name}.dat" # 直接将 .dat 文件当作 .usm
ivf_path = work_dir / "output" / f"{base_name}.dat" / "videos" / f"{base_name}.ivf"