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.
130 lines
5.6 KiB
130 lines
5.6 KiB
{% extends '_main.html' %}
|
|
|
|
{% block title %}Movies - Bazarr{% endblock %}
|
|
|
|
{% block head %}
|
|
|
|
{% endblock head %}
|
|
|
|
{% block body %}
|
|
<div class="container-fluid">
|
|
<!-- Bread crumb and right sidebar toggle -->
|
|
<!-- ============================================================== -->
|
|
<div class="row page-titles">
|
|
<div class="col-md-5 col-8 align-self-center">
|
|
<h3 class="text-themecolor m-b-0 m-t-0"><i class="fas fa-sync"></i></h3>
|
|
</div>
|
|
<div class="col-md-7 col-4 align-self-center">
|
|
<div class="d-flex m-t-10 justify-content-end">
|
|
<div class="d-flex m-r-20 m-l-10 hidden-md-down">
|
|
<div class="chart-text m-r-10">
|
|
<h5 class="m-t-0 text-white">Some page settings</h5></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- ============================================================== -->
|
|
<!-- End Bread crumb and right sidebar toggle -->
|
|
<!-- ============================================================== -->
|
|
<table id="movies" class="table table-striped" style="width:100%">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>Name</th>
|
|
<th>Path Exist</th>
|
|
<th>Audio Language</th>
|
|
<th>Subtitles Languages</th>
|
|
<th>Hearing-Impaired</th>
|
|
<th>Forced</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
{% endblock body %}
|
|
|
|
{% block tail %}
|
|
<script>
|
|
$(document).ready(function () {
|
|
var table = $('#movies').DataTable({
|
|
"processing": false,
|
|
"serverSide": true,
|
|
"searching": false,
|
|
"ordering": false,
|
|
"lengthChange": false,
|
|
"responsive": true,
|
|
"ajax": "{{ url_for('api.movies') }}",
|
|
"columns": [
|
|
{
|
|
"data": "monitored",
|
|
"render": function (data, type, row) {
|
|
if (data === 'False') {
|
|
return '<i class="far fa-bookmark" data-toggle="tooltip" data-placement="right" title="Movie unmonitored in Radarr"></i>';
|
|
} else if (data === 'True') {
|
|
return '<i class="fas fa-bookmark" data-toggle="tooltip" data-placement="right" title="Movie monitored in Radarr"></i>';
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"data": null,
|
|
"render": function (data) {
|
|
if (data.sceneName) {
|
|
return '<i class="fas fa-info-circle" data-toggle="tooltip" data-placement="right" title="' + data.sceneName + '"></i> ' + data.title;
|
|
} else {
|
|
return data.title;
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"data": null,
|
|
"className": "dt-center",
|
|
"render": function (data) {
|
|
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>';
|
|
} else if (data.exist === true) {
|
|
return '<i class="fas fa-check" data-toggle="tooltip" data-placement="right" title="This path seems to be valid: '+data.mapped_path+'"></i>';
|
|
}
|
|
}
|
|
},
|
|
{"data": "audio_language.name"},
|
|
{
|
|
"data": "languages",
|
|
"render": function (data) {
|
|
if (data !== 'None') {
|
|
var languages = '';
|
|
data.forEach(appendFunc);
|
|
return languages;
|
|
} else {
|
|
return null
|
|
}
|
|
|
|
function appendFunc(value) {
|
|
languages = languages + '<span class="badge badge-secondary" data-toggle="tooltip" data-placement="right" title="' + value.name + '">' + value.code2 + '</span> ';
|
|
}
|
|
}
|
|
},
|
|
{"data": "hearing_impaired",
|
|
"className": "dt-center",
|
|
"render": function (data) {
|
|
if (data === 'False') {
|
|
return '<i class="far fa-square"></i>';
|
|
} else if (data === 'True') {
|
|
return '<i class="far fa-check-square"></i>';
|
|
}
|
|
}
|
|
},
|
|
{"data": "forced",
|
|
"className": "dt-center",
|
|
"render": function (data) {
|
|
if (data === 'False') {
|
|
return '<i class="far fa-square"></i>';
|
|
} else if (data === 'True') {
|
|
return '<i class="far fa-check-square"></i>';
|
|
}
|
|
}
|
|
}
|
|
]
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock tail %}
|