Skip to content

Commit a365d4a

Browse files
committed
Fixed ensubtitles.com reset_token method to correctly clear the Authorization header.
1 parent 7a61ec2 commit a365d4a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

custom_libs/subliminal_patch/providers/opensubtitlescom.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,11 +494,11 @@ def download_subtitle(self, subtitle):
494494
subtitle_content = r.content
495495
subtitle.content = fix_line_ending(subtitle_content)
496496

497-
@staticmethod
498-
def reset_token():
497+
def reset_token(self):
499498
logger.debug('Authentication failed: clearing cache and attempting to login.')
500499
region.delete("oscom_token")
501500
region.delete("oscom_server")
501+
self.session.headers.pop('Authorization', None)
502502
return
503503

504504
def checked(self, fn, raise_api_limit=False, validate_json=False, json_key_name=None, validate_content=False,

0 commit comments

Comments
 (0)