mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-02-15 02:15:37 +08:00
Merge branch 'master' into radarr
This commit is contained in:
commit
fa863f56aa
2 changed files with 18 additions and 12 deletions
|
@ -179,9 +179,9 @@ def series():
|
||||||
data = c.fetchall()
|
data = c.fetchall()
|
||||||
c.execute("SELECT code2, name FROM table_settings_languages WHERE enabled = 1")
|
c.execute("SELECT code2, name FROM table_settings_languages WHERE enabled = 1")
|
||||||
languages = c.fetchall()
|
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()
|
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()
|
total_subtitles_list = c.fetchall()
|
||||||
c.close()
|
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)
|
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)
|
||||||
|
|
|
@ -89,15 +89,20 @@
|
||||||
</td>
|
</td>
|
||||||
<td>{{!"" if row[4] == None else row[4]}}</td>
|
<td>{{!"" if row[4] == None else row[4]}}</td>
|
||||||
<td>
|
<td>
|
||||||
%for total_subtitles in total_subtitles_list:
|
%if not total_subtitles_list:
|
||||||
% if total_subtitles[0] == row[5]:
|
% pass
|
||||||
% total_subs = total_subtitles[1]
|
%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
|
||||||
%end
|
% missing_subs = 0
|
||||||
%missing_subs = 0
|
% for missing_subtitles in missing_subtitles_list:
|
||||||
%for missing_subtitles in missing_subtitles_list:
|
% if missing_subtitles[0] == row[5]:
|
||||||
% if missing_subtitles[0] == row[5]:
|
% missing_subs = missing_subtitles[1]
|
||||||
% missing_subs = missing_subtitles[1]
|
% end
|
||||||
% end
|
% end
|
||||||
%end
|
%end
|
||||||
<div class="ui progress" data-value="{{total_subs - missing_subs}}" data-total="{{total_subs}}">
|
<div class="ui progress" data-value="{{total_subs - missing_subs}}" data-total="{{total_subs}}">
|
||||||
|
@ -283,10 +288,11 @@
|
||||||
|
|
||||||
$( ".progress" ).each(function() {
|
$( ".progress" ).each(function() {
|
||||||
if ($(this).progress('is complete') != true) {
|
if ($(this).progress('is complete') != true) {
|
||||||
$(this).progress('set warning');
|
$(this).addClass('yellow');
|
||||||
}
|
}
|
||||||
if ($(this).progress('get total') == 0) {
|
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');
|
$(this).progress('set bar label', '0 / 0');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue