diff options
author | morpheus65535 <[email protected]> | 2021-09-21 21:39:20 -0400 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2021-09-21 21:39:20 -0400 |
commit | c1421f1cce7b2553dbcb2f60954203b0293a8e3b (patch) | |
tree | 40b7847a741d7424da0e6916ace334a40431717d | |
parent | 6d082f8b388341ce70dfb647efb88b0964651f4b (diff) | |
download | bazarr-c1421f1cce7b2553dbcb2f60954203b0293a8e3b.tar.gz bazarr-c1421f1cce7b2553dbcb2f60954203b0293a8e3b.zip |
Improved queries to opensubtitles.com to reduce footprint on their side.v0.9.10-beta.5
-rw-r--r-- | libs/subliminal_patch/providers/opensubtitlescom.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/subliminal_patch/providers/opensubtitlescom.py b/libs/subliminal_patch/providers/opensubtitlescom.py index 957a8e809..24b17f605 100644 --- a/libs/subliminal_patch/providers/opensubtitlescom.py +++ b/libs/subliminal_patch/providers/opensubtitlescom.py @@ -191,10 +191,10 @@ class OpenSubtitlesComProvider(ProviderRetryMixin, Provider): imdb_id = self.video.imdb_id if imdb_id: - parameters = {'imdb_id': imdb_id} + parameters = {'imdb_id': imdb_id.lower()} logging.debug('Searching using this IMDB id: {}'.format(imdb_id)) else: - parameters = {'query': title} + parameters = {'query': title.lower()} logging.debug('Searching using this title: {}'.format(title)) results = self.session.get(self.server_url + 'features', params=parameters, timeout=30) @@ -269,7 +269,7 @@ class OpenSubtitlesComProvider(ProviderRetryMixin, Provider): res = self.session.get(self.server_url + 'subtitles', params=(('episode_number', self.video.episode), ('foreign_parts_only', forced), - ('languages', langs), + ('languages', langs.lower()), ('moviehash', hash), ('parent_feature_id', title_id), ('season_number', self.video.season)), @@ -278,7 +278,7 @@ class OpenSubtitlesComProvider(ProviderRetryMixin, Provider): res = self.session.get(self.server_url + 'subtitles', params=(('foreign_parts_only', forced), ('id', title_id), - ('languages', langs), + ('languages', langs.lower()), ('moviehash', hash)), timeout=30) |