diff --git a/views/episodes.tpl b/views/episodes.tpl index dab968502..8e11f50fe 100644 --- a/views/episodes.tpl +++ b/views/episodes.tpl @@ -1,577 +1,577 @@ - - - - - - - - - - - - - - - - - - - - - - - {{details[0]}} - Bazarr - - - - - - %import ast - %from get_languages import * - %from get_settings import * - %single_language = get_general_settings()[7] -
-
-
Loading...
-
- % include('menu.tpl') - -
-
- -
- - - <% - subs_languages = ast.literal_eval(str(details[7])) - subs_languages_list = [] - if subs_languages is not None: - for subs_language in subs_languages: - subs_languages_list.append(subs_language) - end - end - %> - -
-

{{details[0]}}

-

{{details[1]}}

-

-

{{details[6]}}
-
{{details[8]}}
-
{{number}} files
-

-

- %for language in subs_languages_list: -

{{language}}
- %end -

-
-
- - %if len(seasons) == 0: -
-

No episode files available for this series or Bazarr is still synchronizing with Sonarr. Please come back later.

-
- %else: - %for season in seasons: -
- %missing_subs = len([i for i in season if i[6] != "[]"]) - %total_subs = len(season) - %subs_label = '' - %if subs_languages is not None: - % subs_label = '
' + str(total_subs - missing_subs) + ' / ' + str(total_subs) + '
' - %end -

Season {{season[0][2]}}{{!subs_label}}

-
-
-
-
-

- Show/Hide Episodes

-
-
-
-
- - - - - - - - - - - - - %for episode in season: - - - - - - - - - %end - -
EpisodeTitleExisting
subtitles
Missing
subtitles
Manual
search
- %if episode[9] == 'True': - - %else: - - %end - {{episode[3]}} - % if episode[8] is not None: - - % end - {{episode[0]}} - - %if episode[4] is not None: - % actual_languages = ast.literal_eval(episode[4]) - % actual_languages.sort() - %else: - % actual_languages = '[]' - %end - %try: - %for language in actual_languages: - %if language[1] is not None: - - {{language[0]}} - - - %else: -
- {{language[0]}} -
- %end - %end - %except: - %pass - %end -
- %try: - <% - if episode[6] is not None: - missing_languages = ast.literal_eval(episode[6]) - missing_languages.sort() - end - if missing_languages is not None: - from get_subtitle import search_active - from get_settings import get_general_settings - for language in missing_languages: - if episode[10] is not None and get_general_settings()[25]: - for lang in ast.literal_eval(episode[10]): - if language in lang: - if search_active(lang[1]): - %> - - {{language}} - - - %else: - - {{language}} - - - %end - %end - %end - %else: - - {{language}} - - - %end - %end - %end - %except: - %pass - %end - - %if subs_languages is not None: - - %end -
-
-
-
- %end - %end -
- - - - - - % include('footer.tpl') - - - - + + + + + + + + + + + + + + + + + + + + + + + {{details[0]}} - Bazarr + + + + + + %import ast + %from get_languages import * + %from get_settings import * + %single_language = get_general_settings()[7] +
+
+
Loading...
+
+ % include('menu.tpl') + +
+
+ +
+ + + <% + subs_languages = ast.literal_eval(str(details[7])) + subs_languages_list = [] + if subs_languages is not None: + for subs_language in subs_languages: + subs_languages_list.append(subs_language) + end + end + %> + +
+

{{details[0]}}

+

{{details[1]}}

+

+

{{details[6]}}
+
{{details[8]}}
+
{{number}} files
+

+

+ %for language in subs_languages_list: +

{{language}}
+ %end +

+
+
+ + %if len(seasons) == 0: +
+

No episode files available for this series or Bazarr is still synchronizing with Sonarr. Please come back later.

+
+ %else: + %for season in seasons: +
+ %missing_subs = len([i for i in season if i[6] != "[]"]) + %total_subs = len(season) + %subs_label = '' + %if subs_languages is not None: + % subs_label = '
' + str(total_subs - missing_subs) + ' / ' + str(total_subs) + '
' + %end +

Season {{season[0][2]}}{{!subs_label}}

+
+
+
+
+

+ Show/Hide Episodes

+
+
+
+
+ + + + + + + + + + + + + %for episode in season: + + + + + + + + + %end + +
EpisodeTitleExisting
subtitles
Missing
subtitles
Manual
search
+ %if episode[9] == 'True': + + %else: + + %end + {{episode[3]}} + % if episode[8] is not None: + + % end + {{episode[0]}} + + %if episode[4] is not None: + % actual_languages = ast.literal_eval(episode[4]) + % actual_languages.sort() + %else: + % actual_languages = '[]' + %end + %try: + %for language in actual_languages: + %if language[1] is not None: + + {{language[0]}} + + + %else: +
+ {{language[0]}} +
+ %end + %end + %except: + %pass + %end +
+ %try: + <% + if episode[6] is not None: + missing_languages = ast.literal_eval(episode[6]) + missing_languages.sort() + end + if missing_languages is not None: + from get_subtitle import search_active + from get_settings import get_general_settings + for language in missing_languages: + if episode[10] is not None and get_general_settings()[25] and language in episode[10]: + for lang in ast.literal_eval(episode[10]): + if language in lang: + if search_active(lang[1]): + %> + + {{language}} + + + %else: + + {{language}} + + + %end + %end + %end + %else: + + {{language}} + + + %end + %end + %end + %except: + %pass + %end + + %if subs_languages is not None: + + %end +
+
+
+
+ %end + %end +
+ + + + + + % include('footer.tpl') + + + + diff --git a/views/movie.tpl b/views/movie.tpl index 0edaf75ab..939d8adc3 100644 --- a/views/movie.tpl +++ b/views/movie.tpl @@ -183,7 +183,7 @@ <% for missing_subs_language in missing_subs_languages: - if details[14] is not None and get_general_settings()[25]: + if details[14] is not None and get_general_settings()[25] and missing_subs_language in details[14]: for lang in ast.literal_eval(details[14]): if missing_subs_language in lang: if search_active(lang[1]): diff --git a/views/wantedmovies.tpl b/views/wantedmovies.tpl index f459d1a0e..009e765ec 100644 --- a/views/wantedmovies.tpl +++ b/views/wantedmovies.tpl @@ -75,7 +75,7 @@ from get_subtitle import search_active from get_settings import get_general_settings for language in missing_languages: - if row[6] is not None and get_general_settings()[25]: + if row[6] is not None and get_general_settings()[25] and language in row[6]: for lang in ast.literal_eval(row[6]): if language in lang: active = search_active(lang[1]) diff --git a/views/wantedseries.tpl b/views/wantedseries.tpl index a7931628b..c909883f0 100644 --- a/views/wantedseries.tpl +++ b/views/wantedseries.tpl @@ -82,7 +82,7 @@ from get_subtitle import search_active from get_settings import get_general_settings for language in missing_languages: - if row[9] is not None and get_general_settings()[25]: + if row[9] is not None and get_general_settings()[25] and language in row[9]: for lang in ast.literal_eval(row[9]): if language in lang: active = search_active(lang[1])