fix(ffmpeg_handling): remove word boundaries \b from translation function
This commit is contained in:
1 parent
9929dcbd8c
commit
2d623bbff6
1 file changed
+2
-2
@@ -65,7 +65,7 @@ AUDIO_TRANSLATIONS = {
|
|||||||
"Оригинал": "Original",
|
"Оригинал": "Original",
|
||||||
"Дубляж": "Dubbed",
|
"Дубляж": "Dubbed",
|
||||||
# Languages
|
# Languages
|
||||||
r"русск": "Russian",
|
"русск": "Russian",
|
||||||
"Английски": "English",
|
"Английски": "English",
|
||||||
"български": "Bulgarian",
|
"български": "Bulgarian",
|
||||||
"Български": "Bulgarian",
|
"Български": "Bulgarian",
|
||||||
@@ -173,7 +173,7 @@ def translate_audio_tracks(tracks: list[dict]) -> list[dict]:
|
|||||||
if not isinstance(value, str):
|
if not isinstance(value, str):
|
||||||
continue
|
continue
|
||||||
for src, dst in AUDIO_TRANSLATIONS.items():
|
for src, dst in AUDIO_TRANSLATIONS.items():
|
||||||
if re.search(rf"\b{re.escape(src)}\b", value, flags=re.IGNORECASE):
|
if re.search(rf"{re.escape(src)}", value, flags=re.IGNORECASE):
|
||||||
value = dst
|
value = dst
|
||||||
break
|
break
|
||||||
if CYRILLIC_RE.search(value):
|
if CYRILLIC_RE.search(value):
|
||||||
|
|||||||
Reference in new issue
Block a user