mirror of
https://github.com/morpheus65535/bazarr
synced 2025-01-30 19:02:34 +00:00
added uploader to legendasdivx subtitles
This commit is contained in:
parent
2e798bec0b
commit
21bd7bc792
1 changed files with 13 additions and 9 deletions
|
@ -32,6 +32,7 @@ class LegendasdivxSubtitle(Subtitle):
|
|||
self.description = data['description'].lower()
|
||||
self.video = video
|
||||
self.videoname = data['videoname']
|
||||
self.uploader = data['uploader']
|
||||
|
||||
@property
|
||||
def id(self):
|
||||
|
@ -109,9 +110,6 @@ class LegendasdivxSubtitle(Subtitle):
|
|||
# matches |= guess_matches(video, guessit(self.description))
|
||||
return matches
|
||||
|
||||
|
||||
|
||||
|
||||
class LegendasdivxProvider(Provider):
|
||||
"""Legendasdivx Provider."""
|
||||
languages = {Language('por', 'BR')} | {Language('por')}
|
||||
|
@ -204,14 +202,20 @@ class LegendasdivxProvider(Provider):
|
|||
logger.warning('skipping subbox on %s' % self.searchurl.format(query=querytext))
|
||||
continue
|
||||
|
||||
# get subtitle uploader
|
||||
sub_header = _subbox.find("div", {"class" :"sub_header"})
|
||||
uploader = sub_header.find("a").text if sub_header else '<n/a>'
|
||||
|
||||
exact_match = False
|
||||
if video.name.lower() in description.get_text().lower():
|
||||
exact_match = True
|
||||
data = {'link': self.site + '/modules.php' + download.get('href'),
|
||||
'exact_match': exact_match,
|
||||
'hits': hits,
|
||||
'uploader': uploader,
|
||||
'videoname': videoname,
|
||||
'description': description.get_text() }
|
||||
'description': description.get_text()
|
||||
}
|
||||
subtitles.append(
|
||||
LegendasdivxSubtitle(lang, video, data)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue