From 03b181701e0f52d22e2576d33da5b17be93caa62 Mon Sep 17 00:00:00 2001 From: josdion Date: Sat, 21 Mar 2020 10:08:50 +0200 Subject: [PATCH] do not show release info if it contains only whitespace characters if the release_info contains only whitespace characters in the manual search result dialog they will appear as empty labels. Now they will not be included in releases won't be shown. --- bazarr/get_subtitle.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bazarr/get_subtitle.py b/bazarr/get_subtitle.py index 93aa0f6e7..7d0081716 100644 --- a/bazarr/get_subtitle.py +++ b/bazarr/get_subtitle.py @@ -346,10 +346,15 @@ def manual_search(path, language, hi, forced, providers, providers_auth, sceneNa not_matched = scores - matches s.score = score - releases = ['n/a'] + releases = [] if hasattr(s, 'release_info'): if s.release_info is not None: - releases = s.release_info.split(',') + for s_item in s.release_info.split(','): + if s_item.strip(): + releases.append(s_item) + + if len(releases) == 0: + releases = ['n/a'] subtitles_list.append( dict(score=round((score / max_score * 100), 2),