From d2ab9aa38c1ff327f6dff95d8be437a714a46724 Mon Sep 17 00:00:00 2001 From: Halali Date: Sun, 24 Feb 2019 00:26:19 +0100 Subject: [PATCH] fix for #315 --- bazarr/main.py | 13 ++++++++++--- views/movie.tpl | 3 +++ views/movies.tpl | 3 +++ views/series.tpl | 4 ++-- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/bazarr/main.py b/bazarr/main.py index f022083e3..f5a1e38de 100644 --- a/bazarr/main.py +++ b/bazarr/main.py @@ -608,7 +608,7 @@ def edit_series(no): lang = 'None' single_language = settings.general.getboolean('single_language') - if single_language is True: + if single_language: if str(lang) == "['None']": lang = 'None' else: @@ -805,8 +805,15 @@ def edit_movie(no): else: lang = 'None' - if str(lang) == "['']": - lang = '[]' + single_language = settings.general.getboolean('single_language') + if single_language: + if str(lang) == "['None']": + lang = 'None' + else: + lang = str(lang) + else: + if str(lang) == "['']": + lang = '[]' hi = request.forms.get('hearing_impaired') diff --git a/views/movie.tpl b/views/movie.tpl index 6444c3d1b..f43ef0a0b 100644 --- a/views/movie.tpl +++ b/views/movie.tpl @@ -249,6 +249,9 @@
+ %if single_language: + + %end %for language in languages: %end diff --git a/views/series.tpl b/views/series.tpl index 51a570970..39d0db749 100644 --- a/views/series.tpl +++ b/views/series.tpl @@ -94,7 +94,7 @@ %end %end - {{!"" if row[4] == None else row[4]}} + {{!"" if row[4] is None else row[4]}} %total_subs = 0 %missing_subs = 0 @@ -199,7 +199,7 @@