Skip to content

Commit

Permalink
Fixed typos in assrt provider. #1953
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheus65535 committed Nov 18, 2024
1 parent d67477a commit 48cdc8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_libs/subliminal_patch/providers/assrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from math import ceil

from subliminal import Movie, Episode
from subliminal.exceptions import AuthenticationError, ConfigurationError, DownloadLimitExceeded, ProviderError
from subliminal.exceptions import ConfigurationError, ProviderError
from subliminal_patch.subtitle import Subtitle, guess_matches
from subliminal.subtitle import fix_line_ending
from subliminal_patch.providers import Provider
Expand Down Expand Up @@ -104,15 +104,15 @@ def _get_detail(self):
if 'subtitle_language' in guess:
langs.update(guess['subtitle_language'])
if self.language in langs:
self._defail = f
self._detail = f
return f

# second pass: keyword matching
codes = language_converters['assrt'].codes
for f in files:
langs = set([Language.fromassrt(k) for k in codes if k in f['f']])
if self.language in langs:
self._defail = f
self._detail = f
return f

# fallback: pick up first file if nothing matches
Expand Down

0 comments on commit 48cdc8b

Please sign in to comment.