diff --git a/bazarr.py b/bazarr.py index a03f7b2b3..9b4bd1ca3 100644 --- a/bazarr.py +++ b/bazarr.py @@ -179,9 +179,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 4f9e183ab..a391ad904 100644 --- a/views/series.tpl +++ b/views/series.tpl @@ -89,15 +89,20 @@ {{!"" 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: + % total_subs = 0 + % 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
@@ -283,10 +288,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'); } });