mirror of https://github.com/morpheus65535/bazarr
Fix for manual search when releases_info is None.
This commit is contained in:
parent
0bb2c2dd87
commit
8a50f696c7
|
@ -366,13 +366,18 @@ def manual_search(path, language, hi, forced, providers, providers_auth, sceneNa
|
|||
not_matched = scores - matches
|
||||
s.score = score
|
||||
|
||||
releases = ['n/a']
|
||||
if hasattr(s, 'release_info'):
|
||||
if s.release_info is not None:
|
||||
releases = s.release_info.split(',')
|
||||
|
||||
subtitles_list.append(
|
||||
dict(score=round((score / max_score * 100), 2),
|
||||
language=str(s.language), hearing_impaired=str(s.hearing_impaired),
|
||||
provider=s.provider_name,
|
||||
subtitle=codecs.encode(pickle.dumps(s.make_picklable()), "base64").decode(),
|
||||
url=s.page_link, matches=list(matches), dont_matches=list(not_matched),
|
||||
release_info=s.release_info.split(',') if hasattr(s, 'release_info') else 'n/a'))
|
||||
release_info=releases))
|
||||
|
||||
final_subtitles = sorted(subtitles_list, key=lambda x: x['score'], reverse=True)
|
||||
logging.debug('BAZARR ' + str(len(final_subtitles)) + " Subtitles have been found for this file: " + path)
|
||||
|
|
Loading…
Reference in New Issue