mirror of
https://github.com/morpheus65535/bazarr.git
synced 2024-11-10 17:13:35 +08:00
no log: opensubtitles.com - fixed query arguments ordering to prevent redirection and additional request to provider.
This commit is contained in:
parent
b766b0324e
commit
2a8dd4a89c
1 changed files with 7 additions and 5 deletions
|
@ -289,11 +289,12 @@ class OpenSubtitlesComProvider(ProviderRetryMixin, Provider):
|
|||
lambda: self.session.get(self.server_url + 'subtitles',
|
||||
params=(('episode_number', self.video.episode),
|
||||
('foreign_parts_only', forced),
|
||||
('imdb_id', imdb_id if not title_id else None),
|
||||
('languages', langs.lower()),
|
||||
('moviehash', file_hash),
|
||||
('parent_feature_id', title_id) if title_id else ('imdb_id', imdb_id),
|
||||
('season_number', self.video.season),
|
||||
('query', os.path.basename(self.video.name))),
|
||||
('parent_feature_id', title_id if title_id else None),
|
||||
('query', os.path.basename(self.video.name).lower()),
|
||||
('season_number', self.video.season)),
|
||||
timeout=30),
|
||||
validate_json=True,
|
||||
json_key_name='data'
|
||||
|
@ -305,10 +306,11 @@ class OpenSubtitlesComProvider(ProviderRetryMixin, Provider):
|
|||
lambda: checked(
|
||||
lambda: self.session.get(self.server_url + 'subtitles',
|
||||
params=(('foreign_parts_only', forced),
|
||||
('id', title_id) if title_id else ('imdb_id', imdb_id),
|
||||
('id', title_id if title_id else None),
|
||||
('imdb_id', imdb_id if not title_id else None),
|
||||
('languages', langs.lower()),
|
||||
('moviehash', file_hash),
|
||||
('query', os.path.basename(self.video.name))),
|
||||
('query', os.path.basename(self.video.name).lower())),
|
||||
timeout=30),
|
||||
validate_json=True,
|
||||
json_key_name='data'
|
||||
|
|
Loading…
Reference in a new issue