feat: Bump version to 0.3.1, update filename extraction logic, and enhance rename confirmation screen

This commit is contained in:
sha
2025-12-28 07:14:39 +00:00
parent 229478ce64
commit fe4c0a4a58
8 changed files with 86 additions and 21 deletions
+9 -3
View File
@@ -355,10 +355,16 @@ class FilenameExtractor:
if not langs:
return ''
# Count occurrences and format like mediainfo: "2ukr,eng"
lang_counts = Counter(langs)
# Count occurrences while preserving order of first appearance
lang_counts = {}
for lang in langs:
if lang not in lang_counts:
lang_counts[lang] = 0
lang_counts[lang] += 1
# Format like mediainfo: "2ukr,eng" preserving order
audio_langs = [f"{count}{lang}" if count > 1 else lang for lang, count in lang_counts.items()]
return ','.join(sorted(audio_langs))
return ','.join(audio_langs)
def extract_audio_tracks(self) -> list[dict]:
"""Extract audio track data from filename (simplified version with only language)"""