Skip to content

Commit

Permalink
Added support for Spanish (Latino) in opensubtitles.com. #2720
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheus65535 committed Oct 21, 2024
1 parent 5934d1b commit a1658bb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions custom_libs/subliminal_patch/providers/opensubtitlescom.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def fix_movie_naming(title):
custom_languages = {
'pt': 'pt-PT',
'zh': 'zh-CN',
'es-MX': 'ea',
}


Expand Down Expand Up @@ -156,9 +157,10 @@ class OpenSubtitlesComProvider(ProviderRetryMixin, Provider):
"""OpenSubtitlesCom Provider"""
server_hostname = 'api.opensubtitles.com'

languages = {Language.fromopensubtitles(lang) for lang in language_converters['szopensubtitles'].codes}
languages = ({Language.fromietf("es-MX")} |
{Language.fromopensubtitles(lang) for lang in language_converters['szopensubtitles'].codes})
languages.update(set(Language.rebuild(lang, forced=True) for lang in languages))
languages.update(set(Language.rebuild(l, hi=True) for l in languages))
languages.update(set(Language.rebuild(lang, hi=True) for lang in languages))

video_types = (Episode, Movie)

Expand Down

0 comments on commit a1658bb

Please sign in to comment.