mirror of
https://github.com/zoriya/guessit.git
synced 2026-05-31 09:42:58 +00:00
Merge pull request #320 from ratoaq2/subtitle_language_fix
Fix subtitle language detection when using subtitle_suffixes
This commit is contained in:
@@ -136,7 +136,7 @@ def find_languages(string, context=None):
|
||||
key = 'subtitle_language'
|
||||
for suffix in subtitle_suffixes:
|
||||
if lang_word.endswith(suffix):
|
||||
lang_word = lang_word[:len(suffix) - 1]
|
||||
lang_word = lang_word[:len(lang_word) - len(suffix)]
|
||||
key = 'subtitle_language'
|
||||
for prefix in lang_prefixes:
|
||||
if lang_word.startswith(prefix):
|
||||
|
||||
@@ -17,10 +17,23 @@
|
||||
? ENG.-.FR Sub
|
||||
? +ENG.-.SubFR
|
||||
? +ENG.-.FRSUB
|
||||
? +ENG.-.FRSUBS
|
||||
? +ENG.-.FR-SUBS
|
||||
: language: English
|
||||
subtitle_language: French
|
||||
|
||||
? "{Fr-Eng}.St{Fr-Eng}"
|
||||
? "Le.Prestige[x264.{Fr-Eng}.St{Fr-Eng}.Chaps].mkv"
|
||||
: language: [French, English]
|
||||
subtitle_language: [French, English]
|
||||
subtitle_language: [French, English]
|
||||
|
||||
? +ENG.-.sub.SWE
|
||||
? ENG.-.SWE Sub
|
||||
? +ENG.-.SubSWE
|
||||
? +ENG.-.SWESUB
|
||||
? +ENG.-.sub.SV
|
||||
? ENG.-.SV Sub
|
||||
? +ENG.-.SubSV
|
||||
? +ENG.-.SVSUB
|
||||
: language: English
|
||||
subtitle_language: Swedish
|
||||
Reference in New Issue
Block a user