From a5a2122324b4f192e44011e9521a851f745ca48a Mon Sep 17 00:00:00 2001 From: Louis Vézina <5130500+morpheus65535@users.noreply.github.com> Date: Tue, 24 Apr 2018 10:55:21 -0400 Subject: Check if bazarr was restarted before trying to show progress bar --- views/series.tpl | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'views') diff --git a/views/series.tpl b/views/series.tpl index 4f9e183ab..c14c6b834 100644 --- a/views/series.tpl +++ b/views/series.tpl @@ -89,15 +89,19 @@ {{!"" if row[4] == None else row[4]}} - %for total_subtitles in total_subtitles_list: - % if total_subtitles[0] == row[5]: - % total_subs = total_subtitles[1] + %if not total_subtitles_list: + % pass + %else: + % for total_subtitles in total_subtitles_list: + % if total_subtitles[0] == row[5]: + % total_subs = total_subtitles[1] + % end % end - %end - %missing_subs = 0 - %for missing_subtitles in missing_subtitles_list: - % if missing_subtitles[0] == row[5]: - % missing_subs = missing_subtitles[1] + % missing_subs = 0 + % for missing_subtitles in missing_subtitles_list: + % if missing_subtitles[0] == row[5]: + % missing_subs = missing_subtitles[1] + % end % end %end
-- cgit v1.2.3 From 492761282523d5db2b72f6d12ac6ad1d588afa70 Mon Sep 17 00:00:00 2001 From: Louis Vézina <5130500+morpheus65535@users.noreply.github.com> Date: Tue, 24 Apr 2018 17:16:01 -0400 Subject: Series progress fine-tuning --- views/series.tpl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'views') diff --git a/views/series.tpl b/views/series.tpl index c14c6b834..5ebf1b494 100644 --- a/views/series.tpl +++ b/views/series.tpl @@ -287,10 +287,11 @@ $( ".progress" ).each(function() { if ($(this).progress('is complete') != true) { - $(this).progress('set warning'); + $(this).addClass('yellow'); } if ($(this).progress('get total') == 0) { - $(this).progress('set success'); + $(this).progress('update progress', '99'); + $(this).addClass('grey disabled'); $(this).progress('set bar label', '0 / 0'); } }); -- cgit v1.2.3 From 5660abaa3b8434b42e46b5aaba2f1402af6b0723 Mon Sep 17 00:00:00 2001 From: morpheus65535 <5130500+morpheus65535@users.noreply.github.com> Date: Tue, 24 Apr 2018 19:33:51 -0400 Subject: Series progress fine-tuning --- bazarr.py | 4 ++-- views/series.tpl | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'views') diff --git a/bazarr.py b/bazarr.py index 35624cad0..e5e248770 100644 --- a/bazarr.py +++ b/bazarr.py @@ -154,9 +154,9 @@ def series(): data = c.fetchall() c.execute("SELECT code2, name FROM table_settings_languages WHERE enabled = 1") languages = c.fetchall() - c.execute("SELECT table_shows.sonarrSeriesId, COUNT(table_episodes.missing_subtitles) FROM table_shows LEFT JOIN table_episodes ON table_shows.sonarrSeriesId=table_episodes.sonarrSeriesId WHERE table_episodes.missing_subtitles IS NOT '[]' GROUP BY table_shows.sonarrSeriesId") + c.execute("SELECT table_shows.sonarrSeriesId, COUNT(table_episodes.missing_subtitles) FROM table_shows LEFT JOIN table_episodes ON table_shows.sonarrSeriesId=table_episodes.sonarrSeriesId WHERE table_shows.languages IS NOT 'None' AND table_episodes.missing_subtitles IS NOT '[]' GROUP BY table_shows.sonarrSeriesId") missing_subtitles_list = c.fetchall() - c.execute("SELECT table_shows.sonarrSeriesId, COUNT(table_episodes.missing_subtitles) FROM table_shows LEFT JOIN table_episodes ON table_shows.sonarrSeriesId=table_episodes.sonarrSeriesId GROUP BY table_shows.sonarrSeriesId") + c.execute("SELECT table_shows.sonarrSeriesId, COUNT(table_episodes.missing_subtitles) FROM table_shows LEFT JOIN table_episodes ON table_shows.sonarrSeriesId=table_episodes.sonarrSeriesId WHERE table_shows.languages IS NOT 'None' GROUP BY table_shows.sonarrSeriesId") total_subtitles_list = c.fetchall() c.close() output = template('series', __file__=__file__, bazarr_version=bazarr_version, rows=data, missing_subtitles_list=missing_subtitles_list, total_subtitles_list=total_subtitles_list, languages=languages, missing_count=missing_count, page=page, max_page=max_page, base_url=base_url, single_language=single_language) diff --git a/views/series.tpl b/views/series.tpl index 5ebf1b494..a391ad904 100644 --- a/views/series.tpl +++ b/views/series.tpl @@ -92,6 +92,7 @@ %if not total_subtitles_list: % pass %else: + % total_subs = 0 % for total_subtitles in total_subtitles_list: % if total_subtitles[0] == row[5]: % total_subs = total_subtitles[1] -- cgit v1.2.3