subssabbz, subsunacs, yavkanet - fix setting of uploader

Fix problem where the last uploader is set as uploader of all subtitles.
pull/893/head
josdion 5 years ago
parent be0411d50a
commit 41e84b7e3d

@ -145,10 +145,10 @@ class SubsSabBzProvider(Provider):
element = row.find('a', href = re.compile(r'.*showuser=.*'))
uploader = element.get_text() if element else None
logger.info('Found subtitle link %r', link)
subtitles = subtitles + self.download_archive_and_add_subtitle_files(link, language, video)
for s in subtitles:
sub = self.download_archive_and_add_subtitle_files(link, language, video)
for s in sub:
s.uploader = uploader
subtitles = subtitles + sub
return subtitles
def list_subtitles(self, video, languages):

@ -148,10 +148,10 @@ class SubsUnacsProvider(Provider):
element = row.find('a', href = re.compile(r'.*/search\.php\?t=1\&memid=.*'))
uploader = element.get_text() if element else None
logger.info('Found subtitle link %r', link)
subtitles = subtitles + self.download_archive_and_add_subtitle_files('https://subsunacs.net' + link, language, video)
for s in subtitles:
sub = self.download_archive_and_add_subtitle_files('https://subsunacs.net' + link, language, video)
for s in sub:
s.uploader = uploader
subtitles = subtitles + sub
return subtitles
def list_subtitles(self, video, languages):

@ -132,10 +132,10 @@ class YavkaNetProvider(Provider):
element = row.find('a', {'class': 'click'})
uploader = element.get_text() if element else None
logger.info('Found subtitle link %r', link)
subtitles = subtitles + self.download_archive_and_add_subtitle_files('http://yavka.net/' + link, language, video)
for s in subtitles:
sub = self.download_archive_and_add_subtitle_files('http://yavka.net/' + link, language, video)
for s in sub:
s.uploader = uploader
subtitles = subtitles + sub
return subtitles
def list_subtitles(self, video, languages):

Loading…
Cancel
Save