pull/884/head
Moravčík, Marian 5 years ago
parent 2d1e734400
commit 0e500171ce

@ -133,7 +133,8 @@ a.link:hover, a.link:focus {
font-weight: 400; font-weight: 400;
border-left: 3px solid #ce2829; border-left: 3px solid #ce2829;
background: #252833; background: #252833;
padding: 8px 35px 8px 37px; } padding: 8px 35px 8px 37px;
box-shadow: 0 0 0 rgba(0, 0, 0, 0.2); }
.sidebar-nav > ul > li.active > a i { .sidebar-nav > ul > li.active > a i {
color: #ce2829; color: #ce2829;
font-size: 14px; } font-size: 14px; }
@ -294,14 +295,15 @@ a.link:hover, a.link:focus {
.page-titles { .page-titles {
background: #4f566f; background: #4f566f;
margin: 0 -30px 30px; margin: 0 -30px 5px;
min-height: 50px; min-height: 60px;
height: 50px; height: 60px;
padding: 0; padding: 0;
box-shadow: 0 0 0 rgba(0, 0, 0, 0.1); } box-shadow: 0 0 0 rgba(0, 0, 0, 0.1); }
.page-titles .btn { .page-titles .btn {
height: 50px; height: 50px;
width: 80px; } width: 70px;
padding: 0 0; }
.card-no-border .sidebar-nav > ul > li > a.active { .card-no-border .sidebar-nav > ul > li > a.active {
background: #252833; } background: #252833; }
@ -341,4 +343,40 @@ a.link:hover, a.link:focus {
background: white; background: white;
padding-bottom: 60px; } padding-bottom: 60px; }
.overlay {
display: none;
height: 100%;
width: 100%;
position: fixed;
z-index: 2147483647;
left: 0;
top: 0;
background-color: black;
background-color: rgba(0, 0, 0, 0.8);
backdrop-filter: blur(6px);
overflow-x: hidden; }
.overlay-content {
position: relative;
top: 50%;
width: 100%;
text-align: center; }
.dataTables_wrapper {
padding-top: 0px; }
.dt-buttons {
display: inline-block;
padding-top: 0;
margin-bottom: 0; }
.tooltip {
pointer-events: none; }
table.dataTable tbody td {
vertical-align: middle; }
.container-fluid {
padding: 0 5px 25px 30px; }
/*# sourceMappingURL=bazarr.css.map */ /*# sourceMappingURL=bazarr.css.map */

File diff suppressed because one or more lines are too long

@ -197,6 +197,7 @@ a.link {
border-left: 3px solid $topbar; border-left: 3px solid $topbar;
background: $themecolor-alt; background: $themecolor-alt;
padding: 8px 35px 8px 37px; padding: 8px 35px 8px 37px;
box-shadow: 0 0 0 rgba(0, 0, 0, 0.2);
i { i {
color: $topbar; color: $topbar;
@ -439,15 +440,16 @@ a.link {
.page-titles { .page-titles {
background: #4f566f; background: #4f566f;
margin: 0 -30px 30px; margin: 0 -30px 5px;
min-height: 50px; min-height: 60px;
height: 50px; height: 60px;
padding: 0; padding: 0;
box-shadow: 0 0 0 rgba(0, 0, 0, 0.1); box-shadow: 0 0 0 rgba(0, 0, 0, 0.1);
.btn { .btn {
height: 50px; height: 50px;
width: 80px; width: 70px;
padding: 0 0;
} }
} }
@ -500,3 +502,46 @@ a.link {
background: $bodycolor; background: $bodycolor;
padding-bottom: 60px; padding-bottom: 60px;
} }
.overlay {
display: none;
height: 100%;
width: 100%;
position: fixed;
z-index: 2147483647;
left: 0;
top: 0;
background-color: rgb(0, 0, 0);
background-color: rgba(0, 0, 0, 0.8);
backdrop-filter: blur(6px);
overflow-x: hidden;
}
.overlay-content {
position: relative;
top: 50%;
width: 100%;
text-align: center;
}
.dataTables_wrapper {
padding-top: 0px
}
.dt-buttons{
display: inline-block;
padding-top: 0;
margin-bottom: 0;
}
.tooltip {
pointer-events: none;
}
table.dataTable tbody td {
vertical-align: middle;
}
.container-fluid {
padding: 0 5px 25px 30px;
}

@ -39,34 +39,6 @@
href="{{ url_for('static',filename='plugins/datatables.net-bs4/css/dataTables.bootstrap4.min.css') }}"> href="{{ url_for('static',filename='plugins/datatables.net-bs4/css/dataTables.bootstrap4.min.css') }}">
<link rel="stylesheet" href="{{ url_for('static',filename='css/bootstrap-select.css') }}" /> <link rel="stylesheet" href="{{ url_for('static',filename='css/bootstrap-select.css') }}" />
<style>
table.dataTable tbody td {
vertical-align: middle;
}
.tooltip { pointer-events: none; }
.overlay {
display: none;
height: 100%;
width: 100%;
position: fixed;
z-index: 2147483647;
left: 0;
top: 0;
background-color: rgb(0,0,0);
background-color: rgba(0,0,0, 0.8);
backdrop-filter: blur(6px);
overflow-x: hidden;
}
.overlay-content {
position: relative;
top: 50%;
width: 100%;
text-align: center;
}
</style>
{% endblock head_css %} {% endblock head_css %}
{% block head %} {% block head %}

@ -10,7 +10,7 @@
background-position: top center; background-position: top center;
box-sizing: initial; box-sizing: initial;
margin-left: -32px; margin-left: -32px;
margin-top: -30px; margin-top: -5px;
padding: 2em; padding: 2em;
} }
@ -76,7 +76,8 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<h1><span id="seriesTitle"></span></h1> <h1><span id="seriesTitle"></span></h1>
<i class="far fa-clone" id="seriesAlternateTitles" data-toggle="tooltip" data-placement="right" title="None" data-html="true"></i> <i class="far fa-clone" id="seriesAlternateTitles" data-toggle="tooltip" data-placement="right"
title="None" data-html="true"></i>
</div> </div>
<div class="row"> <div class="row">
<h5><span id="seriesAudioLanguage" class="badge badge-secondary"></span></h5> <h5><span id="seriesAudioLanguage" class="badge badge-secondary"></span></h5>
@ -98,6 +99,7 @@
</div> </div>
</div> </div>
<div class="container-fluid"> <div class="container-fluid">
<!-- ============================================================== -->
<!-- Bread crumb and right sidebar toggle --> <!-- Bread crumb and right sidebar toggle -->
<!-- ============================================================== --> <!-- ============================================================== -->
<table id="episodes" class="table table-striped" style="width:100%"> <table id="episodes" class="table table-striped" style="width:100%">
@ -176,7 +178,8 @@
</div> </div>
<div class="form-group col-sm-1 pl-sm-0"> <div class="form-group col-sm-1 pl-sm-0">
<label class="custom-control custom-checkbox"> <label class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="forced_checkbox" name="forced"> <input type="checkbox" class="custom-control-input" id="forced_checkbox"
name="forced">
<span class="custom-control-label" for="forced_checkbox"></span> <span class="custom-control-label" for="forced_checkbox"></span>
</label> </label>
</div> </div>
@ -234,7 +237,8 @@
Subtitles Language(s) Subtitles Language(s)
</div> </div>
<div class="form-group col-sm-8 pl-sm-0"> <div class="form-group col-sm-8 pl-sm-0">
<select class="selectpicker" id="edit_languages_select" name="languages" multiple data-live-search="true"></select> <select class="selectpicker" id="edit_languages_select" name="languages" multiple
data-live-search="true"></select>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
@ -322,26 +326,28 @@
getEnabledLanguages(); getEnabledLanguages();
var table = $('#episodes').DataTable({ var table = $('#episodes').DataTable({
"processing": true, dom: "tr",
"serverSide": true, processing: true,
serverSide: true,
language: { language: {
zeroRecords: 'No Episodes Found For This Series', zeroRecords: 'No Episodes Found For This Series',
processing: "Loading Episodes..." processing: "Loading Episodes..."
}, },
"searching": false, searching: false,
"ordering": false, ordering: false,
"lengthChange": false, lengthChange: false,
"responsive": true, responsive: true,
"pageLength": {{ settings.general.page_size }}, pageLength: {{ settings.general.page_size }},
"ajax": "{{ url_for('api.episodes') }}?seriesid={{id}}", ajax: "{{ url_for('api.episodes') }}?seriesid={{id}}",
rowGroup: { rowGroup: {
dataSrc: function (data) { dataSrc: function (data) {
return 'Season ' + data.season; return 'Season ' + data.season;
} }
}, },
"columns": [ columns: [
{"data": "monitored", {
"render": function (data, type, row) { data: "monitored",
render: function (data, type, row) {
if (data === 'False') { if (data === 'False') {
return '<i class="far fa-bookmark" data-toggle="tooltip" data-placement="right" title="Episode unmonitored in Sonarr"></i>'; return '<i class="far fa-bookmark" data-toggle="tooltip" data-placement="right" title="Episode unmonitored in Sonarr"></i>';
} else if (data === 'True') { } else if (data === 'True') {
@ -349,9 +355,10 @@
} }
} }
}, },
{"data": "episode"}, {data: "episode"},
{"data": null, {
"render": function (data) { data: null,
render: function (data) {
var title_path = '<a href="" data-toggle="tooltip" title="Path is: ' + data.mapped_path + '" data-season=' + data.season + ' data-episode=' + data.episode + ' data-episodeTitle="' + data.title + '" data-sonarrEpisodeId=' + data.sonarrEpisodeId + ' class="episode_history">' + data.title + '</a>'; var title_path = '<a href="" data-toggle="tooltip" title="Path is: ' + data.mapped_path + '" data-season=' + data.season + ' data-episode=' + data.episode + ' data-episodeTitle="' + data.title + '" data-sonarrEpisodeId=' + data.sonarrEpisodeId + ' class="episode_history">' + data.title + '</a>';
if (data.scene_name) { if (data.scene_name) {
return '<i class="fas fa-info-circle" data-toggle="tooltip" data-placement="right" title="' + data.scene_name + '"></i> ' + title_path; return '<i class="fas fa-info-circle" data-toggle="tooltip" data-placement="right" title="' + data.scene_name + '"></i> ' + title_path;
@ -360,8 +367,9 @@
} }
} }
}, },
{"data": null, {
"render": function (data) { data: null,
render: function (data) {
if (data.subtitles !== 'None') { if (data.subtitles !== 'None') {
var languages = ''; var languages = '';
data.subtitles.forEach(appendFunc); data.subtitles.forEach(appendFunc);
@ -379,8 +387,9 @@
} }
} }
}, },
{"data": null, {
"render": function (data) { data: null,
render: function (data) {
if (data.missing_subtitles !== 'None') { if (data.missing_subtitles !== 'None') {
var languages = ''; var languages = '';
data.missing_subtitles.forEach(appendFunc); data.missing_subtitles.forEach(appendFunc);
@ -394,8 +403,9 @@
} }
} }
}, },
{"data": null, {
"render": function (data) { data: null,
render: function (data) {
if (data.desired_languages !== '[]') { if (data.desired_languages !== '[]') {
return '<a href="" class="manual_search badge badge-secondary" data-season=' + data.season + ' data-episode=' + data.episode + ' data-episode_title="' + data.title + '" data-episodePath="' + data.mapped_path + '" data-sceneName="' + data.scene_name + '" data-language="' + data.desired_languages + '" data-sonarrEpisodeId=' + data.sonarrEpisodeId + '><i class="fas fa-user"></i></a>'; return '<a href="" class="manual_search badge badge-secondary" data-season=' + data.season + ' data-episode=' + data.episode + ' data-episode_title="' + data.title + '" data-episodePath="' + data.mapped_path + '" data-sceneName="' + data.scene_name + '" data-language="' + data.desired_languages + '" data-sonarrEpisodeId=' + data.sonarrEpisodeId + '><i class="fas fa-user"></i></a>';
} else { } else {
@ -403,8 +413,9 @@
} }
} }
}, },
{"data": null, {
"render": function (data) { data: null,
render: function (data) {
if (data.desired_languages !== '[]') { if (data.desired_languages !== '[]') {
return '<a href="" class="upload_subtitle badge badge-secondary" data-episodePath="' + data.mapped_path + '" data-sceneName"' + data.scene_name + '" data-sonarrSeriesId="' + seriesDetails['sonarrSeriesId'] + '" data-sonarrEpisodeId="' + data.sonarrEpisodeId + '" data-season="' + data.season + '" data-episode="' + data.episode + '" data-episode_title="' + data.title + '"><i class="fas fa-cloud-upload-alt"></i></a>'; return '<a href="" class="upload_subtitle badge badge-secondary" data-episodePath="' + data.mapped_path + '" data-sceneName"' + data.scene_name + '" data-sonarrSeriesId="' + seriesDetails['sonarrSeriesId'] + '" data-sonarrEpisodeId="' + data.sonarrEpisodeId + '" data-season="' + data.season + '" data-episode="' + data.episode + '" data-episode_title="' + data.title + '"><i class="fas fa-cloud-upload-alt"></i></a>';
} else { } else {
@ -510,12 +521,14 @@
data: values data: values
}, },
columns: [ columns: [
{ data: 'score', {
data: 'score',
render: function (data) { render: function (data) {
return data + '%'; return data + '%';
} }
}, },
{ data: null, {
data: null,
render: function (data) { render: function (data) {
if (data.language === "pt" && is_pb === true && is_pt === false) { if (data.language === "pt" && is_pb === true && is_pt === false) {
return 'pb' return 'pb'
@ -525,12 +538,14 @@
} }
}, },
{data: 'hearing_impaired'}, {data: 'hearing_impaired'},
{ data: null, {
data: null,
render: function (data) { render: function (data) {
return '<a href="' + data.url + '" target="_blank">' + data.provider + '</a>'; return '<a href="' + data.url + '" target="_blank">' + data.provider + '</a>';
} }
}, },
{ data: null, {
data: null,
render: function (data) { render: function (data) {
const array_matches = data.matches; const array_matches = data.matches;
const array_dont_matches = data.dont_matches; const array_dont_matches = data.dont_matches;
@ -548,7 +563,8 @@
return text; return text;
} }
}, },
{ data: null, {
data: null,
render: function (data) { render: function (data) {
const array_release_info = data.release_info; const array_release_info = data.release_info;
let i; let i;
@ -560,7 +576,8 @@
return text; return text;
} }
}, },
{ data: null, {
data: null,
render: function (data) { render: function (data) {
return '<a href="" class="manual_download badge badge-secondary" data-episodePath="' + episodePath + '" data-sceneName="' + sceneName + '" data-sonarrEpisodeId=' + sonarrEpisodeId + ' data-subtitle="' + data.subtitle + '" data-provider="' + data.provider + '" data-language="' + data.language + '" data-forced="' + forced + '"><i class="fas fa-download" style="margin-right:0px" ></i></a>'; return '<a href="" class="manual_download badge badge-secondary" data-episodePath="' + episodePath + '" data-sceneName="' + sceneName + '" data-sonarrEpisodeId=' + sonarrEpisodeId + ' data-subtitle="' + data.subtitle + '" data-provider="' + data.provider + '" data-language="' + data.language + '" data-forced="' + forced + '"><i class="fas fa-download" style="margin-right:0px" ></i></a>';
} }
@ -786,14 +803,22 @@
url: '{{ url_for( 'api.episodeshistory' )}}?episodeid=' + sonarrEpisodeId url: '{{ url_for( 'api.episodeshistory' )}}?episodeid=' + sonarrEpisodeId
}, },
columns: [ columns: [
{ data: 'action', {
data: 'action',
"render": function (data) { "render": function (data) {
if (data === 0) {return "<i class='fas fa-trash' title='Subtitle file has been erased.' data-toggle='tooltip' data-placement='right'></i>";} if (data === 0) {
else if (data === 1) {return "<i class='fas fa-download' title='Subtitle file has been downloaded.' data-toggle='tooltip' data-placement='right'></i>";} return "<i class='fas fa-trash' title='Subtitle file has been erased.' data-toggle='tooltip' data-placement='right'></i>";
else if (data === 2) {return "<i class='fas fa-user' title='Subtitle file has been manually downloaded.' data-toggle='tooltip' data-placement='right'></i>";} } else if (data === 1) {
else if (data === 3) {return "<i class='fas fa-recycle' title='Subtitle file has been upgraded.' data-toggle='tooltip' data-placement='right'></i>";} return "<i class='fas fa-download' title='Subtitle file has been downloaded.' data-toggle='tooltip' data-placement='right'></i>";
else if (data === 4) {return "<i class='fas fa-cloud-upload-alt' title='Subtitle file has been manually uploaded.' data-toggle='tooltip' data-placement='right'></i>";} } else if (data === 2) {
}}, return "<i class='fas fa-user' title='Subtitle file has been manually downloaded.' data-toggle='tooltip' data-placement='right'></i>";
} else if (data === 3) {
return "<i class='fas fa-recycle' title='Subtitle file has been upgraded.' data-toggle='tooltip' data-placement='right'></i>";
} else if (data === 4) {
return "<i class='fas fa-cloud-upload-alt' title='Subtitle file has been manually uploaded.' data-toggle='tooltip' data-placement='right'></i>";
}
}
},
{data: 'language'}, {data: 'language'},
{data: 'provider'}, {data: 'provider'},
{data: 'score'}, {data: 'score'},

@ -27,20 +27,21 @@
<script> <script>
$(document).ready(function () { $(document).ready(function () {
var table = $('#history_movies').DataTable({ var table = $('#history_movies').DataTable({
"processing": false, processing: false,
"serverSide": true, serverSide: true,
language: { language: {
zeroRecords: 'Nothing Found In Movies History', zeroRecords: 'Nothing Found In Movies History',
processing: "Loading Movies History..." processing: "Loading Movies History..."
}, },
"searching": false, searching: false,
"ordering": false, ordering: false,
"responsive": true, responsive: true,
"lengthChange": false, lengthChange: false,
"pageLength": {{ settings.general.page_size }}, pageLength: {{ settings.general.page_size }},
"ajax": "{{ url_for('api.historymovies') }}", ajax: "{{ url_for('api.historymovies') }}",
"columns": [ columns: [
{"data": "action", {
"data": "action",
"render": function (data) { "render": function (data) {
if (data === 0) { if (data === 0) {
return "<i class='fas fa-trash' title='Subtitle file has been erased.' data-toggle='tooltip' data-placement='right'></i>"; return "<i class='fas fa-trash' title='Subtitle file has been erased.' data-toggle='tooltip' data-placement='right'></i>";
@ -55,14 +56,16 @@
} }
} }
}, },
{"data": null, {
"render": function (data) { data: null,
render: function (data) {
return '<a href="' + "{{ url_for( 'movie', no='tempvalue' ) }}".replace("tempvalue", data.radarrId) + '">' + data.title + '</a>'; return '<a href="' + "{{ url_for( 'movie', no='tempvalue' ) }}".replace("tempvalue", data.radarrId) + '">' + data.title + '</a>';
} }
}, },
{"data": "timestamp"}, {data: "timestamp"},
{"data": null, {
"render": function (data) { data: null,
render: function (data) {
if (data.upgradable) { if (data.upgradable) {
return "<i class='fas fa-recycle' title='This Subtitles File Is Eligible For An Upgrade.' style='color: green;' data-toggle='tooltip' data-placement='right'></i> " + data.description; return "<i class='fas fa-recycle' title='This Subtitles File Is Eligible For An Upgrade.' style='color: green;' data-toggle='tooltip' data-placement='right'></i> " + data.description;
} else { } else {

@ -29,21 +29,22 @@
<script> <script>
$(document).ready(function () { $(document).ready(function () {
var table = $('#history_series').DataTable({ var table = $('#history_series').DataTable({
"processing": true, processing: true,
"serverSide": true, serverSide: true,
language: { language: {
zeroRecords: 'Nothing Found In Series History', zeroRecords: 'Nothing Found In Series History',
processing: "Loading Series History..." processing: "Loading Series History..."
}, },
"searching": false, searching: false,
"ordering": false, ordering: false,
"lengthChange": false, lengthChange: false,
"responsive": true, responsive: true,
"pageLength": {{ settings.general.page_size }}, pageLength: {{ settings.general.page_size }},
"ajax": "{{ url_for('api.historyseries') }}", ajax: "{{ url_for('api.historyseries') }}",
"columns": [ columns: [
{"data": "action", {
"render": function(data) { data: "action",
render: function (data) {
if (data === 0) { if (data === 0) {
return "<i class='fas fa-trash' title='Subtitle file has been erased.' data-toggle='tooltip' data-placement='right'></i>"; return "<i class='fas fa-trash' title='Subtitle file has been erased.' data-toggle='tooltip' data-placement='right'></i>";
} else if (data === 1) { } else if (data === 1) {
@ -57,16 +58,18 @@
} }
} }
}, },
{"data": null, {
"render": function (data) { data: null,
render: function (data) {
return '<a href="' + "{{ url_for( 'episodes', no='tempvalue' ) }}".replace("tempvalue", data.sonarrSeriesId) + '">' + data.seriesTitle + '</a>'; return '<a href="' + "{{ url_for( 'episodes', no='tempvalue' ) }}".replace("tempvalue", data.sonarrSeriesId) + '">' + data.seriesTitle + '</a>';
} }
}, },
{"data": "episode_number"}, {data: "episode_number"},
{"data": "episodeTitle"}, {data: "episodeTitle"},
{"data": "timestamp"}, {data: "timestamp"},
{"data": null, {
"render": function (data) { data: null,
render: function (data) {
if (data.upgradable) { if (data.upgradable) {
return "<i class='fas fa-recycle' title='This Subtitles File Is Eligible For An Upgrade.' style='color: green;' data-toggle='tooltip' data-placement='right'></i> " + data.description; return "<i class='fas fa-recycle' title='This Subtitles File Is Eligible For An Upgrade.' style='color: green;' data-toggle='tooltip' data-placement='right'></i> " + data.description;
} else { } else {

@ -10,7 +10,7 @@
background-position: top center; background-position: top center;
box-sizing: initial; box-sizing: initial;
margin-left: -32px; margin-left: -32px;
margin-top: -30px; margin-top: -5px;
padding: 2em; padding: 2em;
} }

@ -4,7 +4,8 @@
{% block bcleft %} {% block bcleft %}
<div class=""> <div class="">
<button class="btn btn-outline" id="mass_edit" onclick="window.location.href = '{{ url_for('movieseditor') }}';"> <button class="btn btn-outline" id="mass_edit"
onclick="window.location.href = '{{ url_for('movieseditor') }}';">
<div><i class="fas fa-list align-top text-themecolor text-center font-20" aria-hidden="true"></i></div> <div><i class="fas fa-list align-top text-themecolor text-center font-20" aria-hidden="true"></i></div>
<div class="align-bottom text-themecolor small text-center">Mass Edit</div> <div class="align-bottom text-themecolor small text-center">Mass Edit</div>
</button> </button>
@ -56,7 +57,8 @@
Subtitles Language(s) Subtitles Language(s)
</div> </div>
<div class="form-group col-sm-8 pl-sm-0"> <div class="form-group col-sm-8 pl-sm-0">
<select class="selectpicker" id="edit_languages_select" name="languages" multiple data-live-search="true"></select> <select class="selectpicker" id="edit_languages_select" name="languages" multiple
data-live-search="true"></select>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
@ -139,21 +141,21 @@
}); });
var table = $('#movies').DataTable({ var table = $('#movies').DataTable({
"dom": dom:
"<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", "<'row'<'col-sm-5'i><'col-sm-7'p>>",
"processing": false, processing: false,
"serverSide": true, serverSide: true,
"searching": false, searching: false,
"ordering": false, ordering: false,
"lengthChange": true, lengthChange: true,
"responsive": true, responsive: true,
"pageLength": {{ settings.general.page_size }}, pageLength: {{ settings.general.page_size }},
"ajax": "{{ url_for('api.movies') }}", ajax: "{{ url_for('api.movies') }}",
"columns": [ columns: [
{ {
"data": "monitored", data: "monitored",
"render": function (data, type, row) { render: function (data, type, row) {
if (data === 'False') { if (data === 'False') {
return '<i class="far fa-bookmark" data-toggle="tooltip" data-placement="right" title="Movie unmonitored in Radarr"></i>'; return '<i class="far fa-bookmark" data-toggle="tooltip" data-placement="right" title="Movie unmonitored in Radarr"></i>';
} else if (data === 'True') { } else if (data === 'True') {
@ -162,8 +164,8 @@
} }
}, },
{ {
"data": null, data: null,
"render": function (data) { render: function (data) {
if (data.sceneName) { if (data.sceneName) {
return '<i class="fas fa-info-circle" data-toggle="tooltip" data-placement="right" title="' + data.sceneName + '"></i> ' + '<a href="' + "{{ url_for( 'movie', no='tempvalue' ) }}".replace("tempvalue", data.radarrId) + '">' + data.title + '</a>'; return '<i class="fas fa-info-circle" data-toggle="tooltip" data-placement="right" title="' + data.sceneName + '"></i> ' + '<a href="' + "{{ url_for( 'movie', no='tempvalue' ) }}".replace("tempvalue", data.radarrId) + '">' + data.title + '</a>';
} else { } else {
@ -172,9 +174,9 @@
} }
}, },
{ {
"data": null, data: null,
"className": "dt-center", className: "dt-center",
"render": function (data) { render: function (data) {
if (data.exist === false) { if (data.exist === false) {
return '<i class="fas fa-exclamation-triangle" data-toggle="tooltip" data-placement="right" title="This path doesn\'t seem to be valid: ' + data.mapped_path + '"></i>'; return '<i class="fas fa-exclamation-triangle" data-toggle="tooltip" data-placement="right" title="This path doesn\'t seem to be valid: ' + data.mapped_path + '"></i>';
} else if (data.exist === true) { } else if (data.exist === true) {
@ -182,10 +184,10 @@
} }
} }
}, },
{"data": "audio_language.name"}, {data: "audio_language.name"},
{ {
"data": "languages", data: "languages",
"render": function (data) { render: function (data) {
if (data !== 'None') { if (data !== 'None') {
var languages = ''; var languages = '';
data.forEach(appendFunc); data.forEach(appendFunc);
@ -200,16 +202,16 @@
} }
}, },
{ {
"data": "hearing_impaired", data: "hearing_impaired",
"className": "dt-center" className: "dt-center"
}, },
{ {
"data": "forced", data: "forced",
"className": "dt-center" className: "dt-center"
}, },
{ {
"data": null, data: null,
"render": function (data) { render: function (data) {
return '<a href="" class="edit_button badge badge-secondary" data-radarrId=' + data.radarrId + ' data-audiolanguage="' + data.audio_language.name + '" data-title="' + data.title + '" data-languages=' + JSON.stringify(data.languages) + ' data-hi="' + data.hearing_impaired + '" data-forced="' + data.forced + '"><i class="fas fa-wrench"></i></a>'; return '<a href="" class="edit_button badge badge-secondary" data-radarrId=' + data.radarrId + ' data-audiolanguage="' + data.audio_language.name + '" data-title="' + data.title + '" data-languages=' + JSON.stringify(data.languages) + ' data-hi="' + data.hearing_impaired + '" data-forced="' + data.forced + '"><i class="fas fa-wrench"></i></a>';
} }
} }

@ -106,38 +106,39 @@
$('#save_button').css('cursor', 'not-allowed'); $('#save_button').css('cursor', 'not-allowed');
var table = $('#movies').DataTable({ var table = $('#movies').DataTable({
"processing": true, processing: true,
"serverSide": true, serverSide: true,
language: { language: {
zeroRecords: 'No Movies Found', zeroRecords: 'No Movies Found',
processing: "Loading Movies..." processing: "Loading Movies..."
}, },
"searching": false, searching: false,
"ordering": false, ordering: false,
"lengthChange": true, lengthChange: true,
"responsive": true, responsive: true,
"paging": false, paging: false,
"ajax": "{{ url_for('api.movies') }}", ajax: "{{ url_for('api.movies') }}",
"columnDefs": [ { columnDefs: [{
"orderable": false, orderable: false,
"className": 'select-checkbox', className: 'select-checkbox',
"targets": 0 targets: 0
}], }],
"select": { select: {
"style": 'multi', style: 'multi',
"selector": 'td:first-child' selector: 'td:first-child'
}, },
"columns": [ columns: [
{"defaultContent": ""}, {defaultContent: ""},
{"data": null, {
"render": function (data) { data: null,
render: function (data) {
return '<a href="' + "{{ url_for( 'movie', no='tempvalue' ) }}".replace("tempvalue", data.radarrId) + '">' + data.title + '</a>' return '<a href="' + "{{ url_for( 'movie', no='tempvalue' ) }}".replace("tempvalue", data.radarrId) + '">' + data.title + '</a>'
} }
}, },
{"data": "audio_language.name"}, {data: "audio_language.name"},
{ {
"data": "languages", data: "languages",
"render": function (data) { render: function (data) {
if (data !== 'None') { if (data !== 'None') {
var languages = ''; var languages = '';
data.forEach(appendFunc); data.forEach(appendFunc);
@ -152,25 +153,36 @@
} }
}, },
{ {
"data": "hearing_impaired", data: "hearing_impaired",
"className": "dt-center" className: "dt-center"
}, },
{ {
"data": "forced", data: "forced",
"className": "dt-center" className: "dt-center"
} }
] ]
}); });
new $.fn.dataTable.Buttons(table, { new $.fn.dataTable.Buttons(table, {
"buttons": [ buttons: [
'selectAll', {
'selectNone' extend: 'selectAll',
] text: '<div><i class="far fa-check-square align-top text-themecolor text-center font-20" aria-hidden="true"></i></div>\n' +
' <div class="align-bottom text-themecolor small text-center">Select ALL</div>'
},
{
extend: 'selectNone',
text: '<div><i class="far fa-square align-top text-themecolor text-center font-20" aria-hidden="true"></i></div>\n' +
' <div class="align-bottom text-themecolor small text-center nowrap">Deselect ALL</div>'
}]
}); });
table.buttons().container().appendTo('#buttons'); table.buttons().container().appendTo('#buttons');
var btns = $('.dt-button');
btns.addClass('btn btn-outline');
btns.removeClass('dt-button');
table.on('select', function () { table.on('select', function () {
$('.selectpicker').prop('disabled', false); $('.selectpicker').prop('disabled', false);
$('.selectpicker').selectpicker('refresh'); $('.selectpicker').selectpicker('refresh');

@ -4,7 +4,8 @@
{% block bcleft %} {% block bcleft %}
<div class=""> <div class="">
<button class="btn btn-outline" id="mass_edit" onclick="window.location.href = '{{ url_for('serieseditor') }}';"> <button class="btn btn-outline" id="mass_edit"
onclick="window.location.href = '{{ url_for('serieseditor') }}';">
<div><i class="fas fa-list align-top text-themecolor text-center font-20" aria-hidden="true"></i></div> <div><i class="fas fa-list align-top text-themecolor text-center font-20" aria-hidden="true"></i></div>
<div class="align-bottom text-themecolor small text-center">Mass Edit</div> <div class="align-bottom text-themecolor small text-center">Mass Edit</div>
</button> </button>
@ -56,7 +57,8 @@
Subtitles Language(s) Subtitles Language(s)
</div> </div>
<div class="form-group col-sm-8 pl-sm-0"> <div class="form-group col-sm-8 pl-sm-0">
<select class="selectpicker" id="edit_languages_select" name="languages" multiple data-live-search="true"></select> <select class="selectpicker" id="edit_languages_select" name="languages" multiple
data-live-search="true"></select>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
@ -140,29 +142,33 @@
}); });
var table = $('#series').DataTable({ var table = $('#series').DataTable({
"processing": true, dom:
"serverSide": true, "<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
processing: true,
serverSide: true,
language: { language: {
zeroRecords: 'No Series Found', zeroRecords: 'No Series Found',
processing: "Loading Series..." processing: "Loading Series..."
}, },
"searching": false, searching: false,
"ordering": false, ordering: false,
"lengthChange": false, lengthChange: false,
"responsive": true, responsive: true,
"pageLength": {{ settings.general.page_size }}, pageLength: {{ settings.general.page_size }},
"ajax": "{{ url_for('api.series') }}", ajax: "{{ url_for('api.series') }}",
"columns": [ columns: [
{"data": null, {
"render": function (data) { data: null,
render: function (data) {
return '<a href="' + "{{ url_for( 'episodes', no='tempvalue' ) }}".replace("tempvalue", data.sonarrSeriesId) + '">' + data.title + '</a>'; return '<a href="' + "{{ url_for( 'episodes', no='tempvalue' ) }}".replace("tempvalue", data.sonarrSeriesId) + '">' + data.title + '</a>';
} }
}, },
{ {
"data": null, data: null,
"className": "dt-center", className: "dt-center",
"responsivePriority": 1, responsivePriority: 1,
"render": function (data) { render: function (data) {
if (data.exist === false) { if (data.exist === false) {
return '<i class="fas fa-exclamation-triangle" data-toggle="tooltip" data-placement="right" title="This path doesn\'t seem to be valid: ' + data.mapped_path + '"></i>'; return '<i class="fas fa-exclamation-triangle" data-toggle="tooltip" data-placement="right" title="This path doesn\'t seem to be valid: ' + data.mapped_path + '"></i>';
} else if (data.exist === true) { } else if (data.exist === true) {
@ -170,10 +176,10 @@
} }
} }
}, },
{"data": "audio_language.name"}, {data: "audio_language.name"},
{ {
"data": "languages", data: "languages",
"render": function (data) { render: function (data) {
if (data !== 'None') { if (data !== 'None') {
var languages = ''; var languages = '';
data.forEach(appendFunc); data.forEach(appendFunc);
@ -188,17 +194,17 @@
} }
}, },
{ {
"data": "hearing_impaired", data: "hearing_impaired",
"className": "dt-center" className: "dt-center"
}, },
{ {
"data": "forced", data: "forced",
"className": "dt-center" className: "dt-center"
}, },
{ {
"data": null, data: null,
"responsivePriority": 2, responsivePriority: 2,
"render": function (data) { render: function (data) {
var total = data.episodeFileCount; var total = data.episodeFileCount;
var completed = data.episodeFileCount - data.episodeMissingCount; var completed = data.episodeFileCount - data.episodeMissingCount;
var completed_style = ''; var completed_style = '';
@ -211,8 +217,8 @@
} }
}, },
{ {
"data": null, data: null,
"render": function (data) { render: function (data) {
return '<a href="" class="edit_button badge badge-secondary" data-sonarrSeriesId=' + data.sonarrSeriesId + ' data-audiolanguage="' + data.audio_language.name + '" data-title="' + data.title + '" data-languages=' + JSON.stringify(data.languages) + ' data-hi="' + data.hearing_impaired + '" data-forced="' + data.forced + '"><i class="fas fa-wrench"></i></a>'; return '<a href="" class="edit_button badge badge-secondary" data-sonarrSeriesId=' + data.sonarrSeriesId + ' data-audiolanguage="' + data.audio_language.name + '" data-title="' + data.title + '" data-languages=' + JSON.stringify(data.languages) + ' data-hi="' + data.hearing_impaired + '" data-forced="' + data.forced + '"><i class="fas fa-wrench"></i></a>';
} }
} }

@ -106,38 +106,39 @@
$('#save_button').css('cursor', 'not-allowed'); $('#save_button').css('cursor', 'not-allowed');
var table = $('#series').DataTable({ var table = $('#series').DataTable({
"processing": true, processing: true,
"serverSide": true, serverSide: true,
language: { language: {
zeroRecords: 'No Series Found', zeroRecords: 'No Series Found',
processing: "Loading Series..." processing: "Loading Series..."
}, },
"searching": false, searching: false,
"ordering": false, ordering: false,
"lengthChange": true, lengthChange: true,
"responsive": true, responsive: true,
"paging": false, paging: false,
"ajax": "{{ url_for('api.series') }}", ajax: "{{ url_for('api.series') }}",
"columnDefs": [ { columnDefs: [{
"orderable": false, orderable: false,
"className": 'select-checkbox', className: 'select-checkbox',
"targets": 0 targets: 0
}], }],
"select": { select: {
"style": 'multi', style: 'multi',
"selector": 'td:first-child' selector: 'td:first-child'
}, },
"columns": [ columns: [
{"defaultContent": ""}, {defaultContent: ""},
{"data": null, {
"render": function (data) { data: null,
render: function (data) {
return '<a href="' + "{{ url_for( 'episodes', no='tempvalue' ) }}".replace("tempvalue", data.sonarrSeriesId) + '">' + data.title + '</a>' return '<a href="' + "{{ url_for( 'episodes', no='tempvalue' ) }}".replace("tempvalue", data.sonarrSeriesId) + '">' + data.title + '</a>'
} }
}, },
{"data": "audio_language.name"}, {data: "audio_language.name"},
{ {
"data": "languages", data: "languages",
"render": function (data) { render: function (data) {
if (data !== 'None') { if (data !== 'None') {
var languages = ''; var languages = '';
data.forEach(appendFunc); data.forEach(appendFunc);
@ -151,26 +152,31 @@
} }
} }
}, },
{ {data: "hearing_impaired", className: "dt-center"},
"data": "hearing_impaired", {data: "forced", className: "dt-center"}
"className": "dt-center"
},
{
"data": "forced",
"className": "dt-center"
}
] ]
}); });
new $.fn.dataTable.Buttons(table, { new $.fn.dataTable.Buttons(table, {
"buttons": [ buttons: [
'selectAll', {
'selectNone' extend: 'selectAll',
] text: '<div><i class="far fa-check-square align-top text-themecolor text-center font-20" aria-hidden="true"></i></div>\n' +
' <div class="align-bottom text-themecolor small text-center">Select ALL</div>'
},
{
extend: 'selectNone',
text: '<div><i class="far fa-square align-top text-themecolor text-center font-20" aria-hidden="true"></i></div>\n' +
' <div class="align-bottom text-themecolor small text-center nowrap">Deselect ALL</div>'
}]
}); });
table.buttons().container().appendTo('#buttons'); table.buttons().container().appendTo('#buttons');
var btns = $('.dt-button');
btns.addClass('btn btn-outline');
btns.removeClass('dt-button');
table.on('select', function () { table.on('select', function () {
$('.selectpicker').prop('disabled', false); $('.selectpicker').prop('disabled', false);
$('.selectpicker').selectpicker('refresh'); $('.selectpicker').selectpicker('refresh');

@ -28,26 +28,28 @@
<script> <script>
$(document).ready(function () { $(document).ready(function () {
var table = $('#wanted_movies').DataTable({ var table = $('#wanted_movies').DataTable({
"processing": true, processing: true,
"serverSide": true, serverSide: true,
language: { language: {
zeroRecords: 'No Missing Movies Subtitles', zeroRecords: 'No Missing Movies Subtitles',
processing: "Loading Missing Movies Subtitles..." processing: "Loading Missing Movies Subtitles..."
}, },
"searching": false, searching: false,
"ordering": false, ordering: false,
"lengthChange": false, lengthChange: false,
"responsive": true, responsive: true,
"pageLength": {{ settings.general.page_size }}, pageLength: {{ settings.general.page_size }},
"ajax": "{{ url_for('api.wantedmovies') }}", ajax: "{{ url_for('api.wantedmovies') }}",
"columns": [ columns: [
{"data": null, {
"render": function (data) { data: null,
render: function (data) {
return '<a href="' + "{{ url_for( 'movie', no='tempvalue' ) }}".replace("tempvalue", data.radarrId) + '">' + data.title + '</a>'; return '<a href="' + "{{ url_for( 'movie', no='tempvalue' ) }}".replace("tempvalue", data.radarrId) + '">' + data.title + '</a>';
} }
}, },
{"data": null, {
"render": function (data) { data: null,
render: function (data) {
if (data.missing_subtitles !== 'None') { if (data.missing_subtitles !== 'None') {
var languages = ''; var languages = '';
data.missing_subtitles.forEach(appendFunc); data.missing_subtitles.forEach(appendFunc);

@ -30,28 +30,30 @@
<script> <script>
$(document).ready(function () { $(document).ready(function () {
var table = $('#wanted_series').DataTable({ var table = $('#wanted_series').DataTable({
"processing": true, processing: true,
"serverSide": true, serverSide: true,
language: { language: {
zeroRecords: 'No Missing Series Subtitles', zeroRecords: 'No Missing Series Subtitles',
processing: "Loading Missing Series Subtitles..." processing: "Loading Missing Series Subtitles..."
}, },
"searching": false, searching: false,
"ordering": false, ordering: false,
"lengthChange": false, lengthChange: false,
"responsive": true, responsive: true,
"pageLength": {{ settings.general.page_size }}, pageLength: {{ settings.general.page_size }},
"ajax": "{{ url_for('api.wantedseries') }}", ajax: "{{ url_for('api.wantedseries') }}",
"columns": [ columns: [
{"data": null, {
"render": function (data) { data: null,
render: function (data) {
return '<a href="' + "{{ url_for( 'episodes', no='tempvalue' ) }}".replace("tempvalue", data.sonarrSeriesId) + '">' + data.seriesTitle + '</a>'; return '<a href="' + "{{ url_for( 'episodes', no='tempvalue' ) }}".replace("tempvalue", data.sonarrSeriesId) + '">' + data.seriesTitle + '</a>';
} }
}, },
{"data": "episode_number"}, {data: "episode_number"},
{"data": "episodeTitle"}, {data: "episodeTitle"},
{"data": null, {
"render": function (data) { data: null,
render: function (data) {
if (data.missing_subtitles !== 'None') { if (data.missing_subtitles !== 'None') {
var languages = ''; var languages = '';
data.missing_subtitles.forEach(appendFunc); data.missing_subtitles.forEach(appendFunc);

Loading…
Cancel
Save