@ -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: -30 px;
margin-top: -5 px;
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'},