This commit is contained in:
Louis Vézina 2020-08-03 11:32:31 -04:00
parent 52518f8536
commit d5fc0d1908
1 changed files with 19 additions and 12 deletions

View File

@ -254,16 +254,23 @@
</ul> </ul>
</li> </li>
<li><a href="#"><i class="fas fa-exclamation-triangle"></i><span <li><a href="#"><i class="fas fa-exclamation-triangle"></i>
class="hide-menu"> Wanted</span></a> <span class="hide-menu"> Wanted </span>
{% if settings.general.getboolean('use_sonarr') %}
<span class="wanted_series_badge"></span>
{% endif %}
{% if settings.general.getboolean('use_radarr') %}
<span class="wanted_movies_badge"></span>
{% endif %}
</a>
<ul aria-expanded="false" class="collapse"> <ul aria-expanded="false" class="collapse">
{% if settings.general.getboolean('use_sonarr') %} {% if settings.general.getboolean('use_sonarr') %}
<li> <li>
<a href="{{ url_for('wantedseries') }}"> Series <span id="wanted_series_badge"></span></a> <a href="{{ url_for('wantedseries') }}"> Series <span class="wanted_series_badge"></span></a>
</li> </li>
{% endif %} {% endif %}
{% if settings.general.getboolean('use_radarr') %} {% if settings.general.getboolean('use_radarr') %}
<li><a href="{{ url_for('wantedmovies') }}"> Movies <span id="wanted_movies_badge"></span></a></li> <li><a href="{{ url_for('wantedmovies') }}"> Movies <span class="wanted_movies_badge"></span></a></li>
{% endif %} {% endif %}
</ul> </ul>
</li> </li>
@ -283,11 +290,11 @@
</li> </li>
<li><a href="#"><i <li><a href="#"><i
class="fas fa-laptop"></i><span class="hide-menu"> System</span></a> class="fas fa-laptop"></i><span class="hide-menu"> System </span><span class="throttled_providers_count"></span></a>
<ul aria-expanded="false" class="collapse"> <ul aria-expanded="false" class="collapse">
<li><a href="{{ url_for('systemtasks') }}"> Tasks</a></li> <li><a href="{{ url_for('systemtasks') }}"> Tasks</a></li>
<li><a href="{{ url_for('systemlogs') }}"> Logs</a></li> <li><a href="{{ url_for('systemlogs') }}"> Logs</a></li>
<li><a href="{{ url_for('systemproviders') }}"> Providers <span id="throttled_providers_count"></span></a></li> <li><a href="{{ url_for('systemproviders') }}"> Providers <span class="throttled_providers_count"></span></a></li>
<li><a href="{{ url_for('systemstatus') }}"> Status</a></li> <li><a href="{{ url_for('systemstatus') }}"> Status</a></li>
<li><a href="{{ url_for('systemreleases') }}"> Releases</a></li> <li><a href="{{ url_for('systemreleases') }}"> Releases</a></li>
</ul> </ul>
@ -426,19 +433,19 @@
async: true, async: true,
success: function (data) { success: function (data) {
if (data['throttled_providers']) { if (data['throttled_providers']) {
$('#throttled_providers_count').html('<span class="badge badge-secondary">' + data['throttled_providers'] + '</span>'); $('.throttled_providers_count').html('<span class="badge badge-secondary">' + data['throttled_providers'] + '</span>');
} else { } else {
$('#throttled_providers_count').html(''); $('.throttled_providers_count').html('');
} }
if (data['missing_episodes']) { if (data['missing_episodes']) {
$('#wanted_series_badge').html('<span class="badge badge-secondary">' + data['missing_episodes'] + '</span>'); $('.wanted_series_badge').html('<span class="badge badge-secondary">' + data['missing_episodes'] + '</span>');
} else { } else {
$('#wanted_series_badge').html(''); $('.wanted_series_badge').html('');
} }
if (data['missing_movies']) { if (data['missing_movies']) {
$('#wanted_movies_badge').html('<span class="badge badge-secondary">' + data['missing_movies'] + '</span>'); $('.wanted_movies_badge').html('<span class="badge badge-secondary">' + data['missing_movies'] + '</span>');
} else { } else {
$('#wanted_movies_badge').html(''); $('.wanted_movies_badge').html('');
} }
}, },