From 7b341d12196de3356406539538ef4fbd8326a75d Mon Sep 17 00:00:00 2001 From: morpheus65535 <5130500+morpheus65535@users.noreply.github.com> Date: Sun, 22 Apr 2018 22:08:22 -0400 Subject: [PATCH] Add progress bar for series and seasons #62 --- bazarr.py | 6 +++++- views/episodes.tpl | 4 +++- views/series.tpl | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/bazarr.py b/bazarr.py index bea01bd84..ea32f7efb 100644 --- a/bazarr.py +++ b/bazarr.py @@ -153,8 +153,12 @@ 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") + 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") + total_subtitles_list = c.fetchall() c.close() - output = template('series', __file__=__file__, bazarr_version=bazarr_version, rows=data, languages=languages, missing_count=missing_count, page=page, max_page=max_page, base_url=base_url, single_language=single_language) + 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) return output @route(base_url + 'serieseditor') diff --git a/views/episodes.tpl b/views/episodes.tpl index 6e22f0389..3633ef236 100644 --- a/views/episodes.tpl +++ b/views/episodes.tpl @@ -122,7 +122,9 @@ %else: %for season in seasons: