You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
161 lines
5.3 KiB
161 lines
5.3 KiB
6 years ago
|
<!DOCTYPE html>
|
||
6 years ago
|
<html lang="en">
|
||
7 years ago
|
<head>
|
||
7 years ago
|
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
||
|
<script src="{{base_url}}static/semantic/semantic.min.js"></script>
|
||
|
<script src="{{base_url}}static/jquery/tablesort.js"></script>
|
||
|
<link rel="stylesheet" href="{{base_url}}static/semantic/semantic.min.css">
|
||
7 years ago
|
|
||
7 years ago
|
<link rel="apple-touch-icon" sizes="120x120" href="{{base_url}}static/apple-touch-icon.png">
|
||
|
<link rel="icon" type="image/png" sizes="32x32" href="{{base_url}}static/favicon-32x32.png">
|
||
|
<link rel="icon" type="image/png" sizes="16x16" href="{{base_url}}static/favicon-16x16.png">
|
||
|
<link rel="manifest" href="{{base_url}}static/manifest.json">
|
||
|
<link rel="mask-icon" href="{{base_url}}static/safari-pinned-tab.svg" color="#5bbad5">
|
||
|
<link rel="shortcut icon" href="{{base_url}}static/favicon.ico">
|
||
|
<meta name="msapplication-config" content="{{base_url}}static/browserconfig.xml">
|
||
7 years ago
|
<meta name="theme-color" content="#ffffff">
|
||
|
|
||
|
<title>Wanted - Bazarr</title>
|
||
|
|
||
|
<style>
|
||
|
body {
|
||
|
background-color: #272727;
|
||
|
}
|
||
|
#fondblanc {
|
||
|
background-color: #ffffff;
|
||
6 years ago
|
border-radius: 0;
|
||
|
box-shadow: 0 0 5px 5px #ffffff;
|
||
7 years ago
|
margin-top: 32px;
|
||
|
margin-bottom: 3em;
|
||
7 years ago
|
padding: 1em;
|
||
7 years ago
|
}
|
||
5 years ago
|
.fast.backward, .backward, .forward, .fast.forward {
|
||
|
cursor: pointer;
|
||
|
}
|
||
|
.fast.backward, .backward, .forward, .fast.forward { pointer-events: auto; }
|
||
|
.fast.backward.disabled, .backward.disabled, .forward.disabled, .fast.forward.disabled { pointer-events: none; }
|
||
|
.ui.tabular.menu > .disabled.item {
|
||
|
opacity: 0.45 !important;
|
||
|
pointer-events: none !important;
|
||
|
}
|
||
7 years ago
|
</style>
|
||
|
</head>
|
||
|
<body>
|
||
6 years ago
|
% from get_args import args
|
||
6 years ago
|
|
||
7 years ago
|
% import os
|
||
5 years ago
|
% from database import database
|
||
5 years ago
|
% import operator
|
||
|
% from config import settings
|
||
5 years ago
|
% from functools import reduce
|
||
7 years ago
|
|
||
5 years ago
|
%if settings.sonarr.getboolean('only_monitored'):
|
||
|
% episodes_missing_subtitles_clause = " AND monitored='True'"
|
||
|
%else:
|
||
|
% episodes_missing_subtitles_clause = ""
|
||
6 years ago
|
%end
|
||
|
|
||
5 years ago
|
%if settings.radarr.getboolean('only_monitored'):
|
||
|
% episodes_missing_subtitles_clause_movie = " AND monitored='True'"
|
||
|
%else:
|
||
|
% episodes_missing_subtitles_clause_movie = ""
|
||
6 years ago
|
%end
|
||
|
|
||
5 years ago
|
% wanted_series = database.execute("SELECT COUNT(*) as count FROM table_episodes WHERE missing_subtitles != '[]'" + episodes_missing_subtitles_clause, only_one=True)['count']
|
||
|
% wanted_movies = database.execute("SELECT COUNT(*) as count FROM table_movies WHERE missing_subtitles != '[]'" + episodes_missing_subtitles_clause_movie, only_one=True)['count']
|
||
5 years ago
|
|
||
7 years ago
|
<div id='loader' class="ui page dimmer">
|
||
6 years ago
|
<div id="loader_text" class="ui indeterminate text loader">Loading...</div>
|
||
7 years ago
|
</div>
|
||
7 years ago
|
% include('menu.tpl')
|
||
7 years ago
|
|
||
7 years ago
|
<div id="fondblanc" class="ui container">
|
||
7 years ago
|
<div class="ui top attached tabular menu">
|
||
6 years ago
|
<a id="series_tab" class="tabs item active" data-enabled="{{settings.general.getboolean('use_sonarr')}}" data-tab="series">Series
|
||
5 years ago
|
%if settings.general.getboolean('use_sonarr'):
|
||
7 years ago
|
<div class="ui tiny yellow label">
|
||
5 years ago
|
{{wanted_series}}
|
||
7 years ago
|
</div>
|
||
5 years ago
|
%end
|
||
7 years ago
|
</a>
|
||
6 years ago
|
<a id="movies_tab" class="tabs item" data-enabled="{{settings.general.getboolean('use_radarr')}}" data-tab="movies">Movies
|
||
5 years ago
|
%if settings.general.getboolean('use_radarr'):
|
||
7 years ago
|
<div class="ui tiny green label">
|
||
5 years ago
|
{{wanted_movies}}
|
||
7 years ago
|
</div>
|
||
5 years ago
|
%end
|
||
7 years ago
|
</a>
|
||
|
</div>
|
||
|
<div class="ui bottom attached tab segment" data-tab="series">
|
||
|
<div class="content">
|
||
|
<div id="content_series"></div>
|
||
|
</div>
|
||
7 years ago
|
</div>
|
||
7 years ago
|
<div class="ui bottom attached tab segment" data-tab="movies">
|
||
|
<div class="content">
|
||
|
<div id="content_movies"></div>
|
||
7 years ago
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
7 years ago
|
% include('footer.tpl')
|
||
7 years ago
|
</body>
|
||
|
</html>
|
||
|
|
||
|
|
||
|
<script>
|
||
7 years ago
|
$('.menu .item')
|
||
|
.tab()
|
||
|
;
|
||
7 years ago
|
|
||
6 years ago
|
$('#series_tab').on('click', function() {
|
||
7 years ago
|
loadURLseries(1);
|
||
6 years ago
|
});
|
||
7 years ago
|
|
||
6 years ago
|
$('#movies_tab').on('click', function() {
|
||
7 years ago
|
loadURLmovies(1);
|
||
6 years ago
|
});
|
||
7 years ago
|
|
||
7 years ago
|
function loadURLseries(page) {
|
||
|
$.ajax({
|
||
|
url: "{{base_url}}wantedseries?page=" + page,
|
||
|
beforeSend: function() { $('#loader').addClass('active'); },
|
||
|
complete: function() { $('#loader').removeClass('active'); },
|
||
|
cache: false
|
||
|
}).done(function(data) {
|
||
|
$("#content_series").html(data);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
function loadURLmovies(page) {
|
||
|
$.ajax({
|
||
|
url: "{{base_url}}wantedmovies?page=" + page,
|
||
|
beforeSend: function() { $('#loader').addClass('active'); },
|
||
|
complete: function() { $('#loader').removeClass('active'); },
|
||
|
cache: false
|
||
|
}).done(function(data) {
|
||
|
$("#content_movies").html(data);
|
||
|
});
|
||
|
}
|
||
|
|
||
6 years ago
|
$('a:not(.tabs), button:not(.cancel, #download_log)').on('click', function(){
|
||
7 years ago
|
$('#loader').addClass('active');
|
||
6 years ago
|
});
|
||
7 years ago
|
|
||
6 years ago
|
if ($('#series_tab').data("enabled") === "True") {
|
||
7 years ago
|
$("#series_tab").removeClass('disabled');
|
||
|
} else {
|
||
|
$("#series_tab").addClass('disabled');
|
||
|
}
|
||
|
|
||
6 years ago
|
if ($('#movies_tab').data("enabled") === "True") {
|
||
7 years ago
|
$("#movies_tab").removeClass('disabled');
|
||
|
} else {
|
||
|
$("#movies_tab").addClass('disabled');
|
||
|
}
|
||
6 years ago
|
if ($('#series_tab').data("enabled") === "True") {
|
||
7 years ago
|
$( "#series_tab" ).trigger( "click" );
|
||
|
}
|
||
6 years ago
|
if ($('#series_tab').data("enabled") === "False" && $('#movies_tab').data("enabled") === "True") {
|
||
7 years ago
|
$( "#movies_tab" ).trigger( "click" );
|
||
|
}
|
||
7 years ago
|
</script>
|