2017-10-03 02:59:45 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<!DOCTYPE html>
|
2017-11-09 21:13:14 +00:00
|
|
|
<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">
|
2017-10-03 02:59:45 +00:00
|
|
|
|
2017-11-09 21:13:14 +00:00
|
|
|
<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">
|
2017-10-03 02:59:45 +00:00
|
|
|
<meta name="theme-color" content="#ffffff">
|
|
|
|
|
|
|
|
<title>Wanted - Bazarr</title>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
body {
|
|
|
|
background-color: #272727;
|
|
|
|
}
|
|
|
|
#fondblanc {
|
|
|
|
background-color: #ffffff;
|
|
|
|
border-radius: 0px;
|
|
|
|
box-shadow: 0px 0px 5px 5px #ffffff;
|
|
|
|
margin-top: 32px;
|
|
|
|
margin-bottom: 3em;
|
2018-05-02 10:25:42 +00:00
|
|
|
padding: 1em;
|
2017-10-16 23:27:19 +00:00
|
|
|
}
|
2018-05-02 10:25:42 +00:00
|
|
|
#logs {
|
|
|
|
margin-top: 4em;
|
2017-10-03 02:59:45 +00:00
|
|
|
}
|
|
|
|
.fast.backward, .backward, .forward, .fast.forward {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
2017-11-22 04:01:26 +00:00
|
|
|
.fast.backward, .backward, .forward, .fast.forward { pointer-events: auto; }
|
|
|
|
.fast.backward.disabled, .backward.disabled, .forward.disabled, .fast.forward.disabled { pointer-events: none; }
|
2018-05-27 03:01:57 +00:00
|
|
|
.ui.tabular.menu > .disabled.item {
|
|
|
|
opacity: 0.45 !important;
|
|
|
|
pointer-events: none !important;
|
|
|
|
}
|
2017-10-03 02:59:45 +00:00
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
2018-08-16 02:01:49 +00:00
|
|
|
% from get_argv import config_dir
|
|
|
|
|
2018-05-02 10:25:42 +00:00
|
|
|
% import os
|
|
|
|
% import sqlite3
|
2018-08-09 03:43:13 +00:00
|
|
|
% from get_general_settings import *
|
2018-05-02 10:25:42 +00:00
|
|
|
|
2018-08-09 03:43:13 +00:00
|
|
|
%if get_general_settings()[24] == "True":
|
|
|
|
% monitored_only_query_string = ' AND monitored = "True"'
|
|
|
|
%else:
|
|
|
|
% monitored_only_query_string = ""
|
|
|
|
%end
|
|
|
|
|
2018-08-16 02:01:49 +00:00
|
|
|
% conn = sqlite3.connect(os.path.join(config_dir, 'db/bazarr.db'), timeout=30)
|
2018-05-02 10:25:42 +00:00
|
|
|
% c = conn.cursor()
|
2018-08-09 03:43:13 +00:00
|
|
|
% wanted_series = c.execute("SELECT COUNT(*) FROM table_episodes WHERE missing_subtitles != '[]'" + monitored_only_query_string).fetchone()
|
|
|
|
% wanted_movies = c.execute("SELECT COUNT(*) FROM table_movies WHERE missing_subtitles != '[]'" + monitored_only_query_string).fetchone()
|
2018-05-02 10:25:42 +00:00
|
|
|
% c.close()
|
|
|
|
|
2017-10-03 02:59:45 +00:00
|
|
|
<div id='loader' class="ui page dimmer">
|
|
|
|
<div class="ui indeterminate text loader">Loading...</div>
|
|
|
|
</div>
|
2017-12-22 00:49:39 +00:00
|
|
|
% include('menu.tpl')
|
2017-10-03 02:59:45 +00:00
|
|
|
|
2018-05-27 03:01:57 +00:00
|
|
|
% import os
|
|
|
|
% import sqlite3
|
|
|
|
|
2018-08-16 02:01:49 +00:00
|
|
|
% conn = sqlite3.connect(os.path.join(config_dir, 'db/bazarr.db'), timeout=30)
|
2018-05-27 03:01:57 +00:00
|
|
|
% c = conn.cursor()
|
|
|
|
|
|
|
|
% integration = c.execute("SELECT use_sonarr, use_radarr FROM table_settings_general").fetchone()
|
|
|
|
|
|
|
|
% c.close()
|
2017-10-03 02:59:45 +00:00
|
|
|
<div id="fondblanc" class="ui container">
|
2018-05-02 10:25:42 +00:00
|
|
|
<div class="ui top attached tabular menu">
|
2018-05-27 03:01:57 +00:00
|
|
|
<a id="series_tab" class="tabs item active" data-enabled="{{integration[0]}}" data-tab="series">Series
|
2018-05-02 10:25:42 +00:00
|
|
|
<div class="ui tiny yellow label">
|
|
|
|
{{wanted_series[0]}}
|
|
|
|
</div>
|
|
|
|
</a>
|
2018-05-27 03:01:57 +00:00
|
|
|
<a id="movies_tab" class="tabs item" data-enabled="{{integration[1]}}" data-tab="movies">Movies
|
2018-05-02 10:25:42 +00:00
|
|
|
<div class="ui tiny green label">
|
|
|
|
{{wanted_movies[0]}}
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<div class="ui bottom attached tab segment" data-tab="series">
|
|
|
|
<div class="content">
|
|
|
|
<div id="content_series"></div>
|
|
|
|
</div>
|
2017-10-16 23:27:19 +00:00
|
|
|
</div>
|
2018-05-02 10:25:42 +00:00
|
|
|
<div class="ui bottom attached tab segment" data-tab="movies">
|
|
|
|
<div class="content">
|
|
|
|
<div id="content_movies"></div>
|
2017-10-03 02:59:45 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2017-12-22 00:49:39 +00:00
|
|
|
% include('footer.tpl')
|
2017-10-03 02:59:45 +00:00
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2018-05-02 10:25:42 +00:00
|
|
|
$('.menu .item')
|
|
|
|
.tab()
|
|
|
|
;
|
2017-10-03 02:59:45 +00:00
|
|
|
|
2018-05-02 10:25:42 +00:00
|
|
|
$('#series_tab').click(function() {
|
|
|
|
loadURLseries(1);
|
2017-10-03 02:59:45 +00:00
|
|
|
})
|
2017-10-16 23:27:19 +00:00
|
|
|
|
2018-05-02 10:25:42 +00:00
|
|
|
$('#movies_tab').click(function() {
|
|
|
|
loadURLmovies(1);
|
2017-10-16 23:27:19 +00:00
|
|
|
})
|
|
|
|
|
2018-05-02 10:25:42 +00:00
|
|
|
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);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
$('a:not(.tabs), button:not(.cancel, #download_log)').click(function(){
|
|
|
|
$('#loader').addClass('active');
|
2017-10-16 23:27:19 +00:00
|
|
|
})
|
2018-05-02 10:25:42 +00:00
|
|
|
|
2018-05-27 03:01:57 +00:00
|
|
|
if ($('#series_tab').data("enabled") == "True") {
|
|
|
|
$("#series_tab").removeClass('disabled');
|
|
|
|
} else {
|
|
|
|
$("#series_tab").addClass('disabled');
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($('#movies_tab').data("enabled") == "True") {
|
|
|
|
$("#movies_tab").removeClass('disabled');
|
|
|
|
} else {
|
|
|
|
$("#movies_tab").addClass('disabled');
|
|
|
|
}
|
|
|
|
if ($('#series_tab').data("enabled") == "True") {
|
|
|
|
$( "#series_tab" ).trigger( "click" );
|
|
|
|
}
|
|
|
|
if ($('#series_tab').data("enabled") == "False" && $('#movies_tab').data("enabled") == "True") {
|
|
|
|
$( "#movies_tab" ).trigger( "click" );
|
|
|
|
}
|
2017-10-03 02:59:45 +00:00
|
|
|
</script>
|