2019-12-28 05:52:00 +00:00
|
|
|
{% extends '_main.html' %}
|
|
|
|
|
|
|
|
{% block title %}Movies - Bazarr{% endblock %}
|
|
|
|
|
2020-01-01 22:15:50 +00:00
|
|
|
{% block bcleft %}
|
|
|
|
<div class="d-flex">
|
|
|
|
<button class="btn btn-outline">
|
|
|
|
<i class="fas fa-sync align-top text-themecolor text-center" aria-hidden="true"></i>
|
|
|
|
<span class="align-bottom">Update</span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
{% endblock bcleft %}
|
2019-12-28 05:52:00 +00:00
|
|
|
|
2020-01-01 22:15:50 +00:00
|
|
|
{% block bcright %}
|
|
|
|
<div class="d-flex m-t-5 justify-content-end">
|
|
|
|
<h5 class="m-t-0 text-themecolor">Some page settings</h5>
|
|
|
|
</div>
|
|
|
|
{% endblock bcright %}
|
2019-12-28 05:52:00 +00:00
|
|
|
|
|
|
|
{% block body %}
|
2020-01-01 22:15:50 +00:00
|
|
|
<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>
|
2019-12-28 05:52:00 +00:00
|
|
|
{% endblock body %}
|
|
|
|
|
|
|
|
{% block tail %}
|
2019-12-29 10:56:34 +00:00
|
|
|
<script>
|
|
|
|
$(document).ready(function () {
|
|
|
|
var table = $('#movies').DataTable({
|
2020-01-01 22:15:50 +00:00
|
|
|
"dom":
|
|
|
|
"<'row'<'col-sm-12'tr>>" +
|
|
|
|
"<'row'<'col-sm-5'i><'col-sm-7'p>>",
|
2019-12-29 16:29:07 +00:00
|
|
|
"processing": false,
|
2019-12-29 10:56:34 +00:00
|
|
|
"serverSide": true,
|
|
|
|
"searching": false,
|
|
|
|
"ordering": false,
|
2020-01-01 22:15:50 +00:00
|
|
|
"lengthChange": true,
|
2019-12-30 14:07:49 +00:00
|
|
|
"responsive": true,
|
2020-01-01 22:15:50 +00:00
|
|
|
"pageLength": {{ settings.general.page_size }},
|
2019-12-29 10:56:34 +00:00
|
|
|
"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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2019-12-29 16:29:07 +00:00
|
|
|
"data": null,
|
|
|
|
"className": "dt-center",
|
2019-12-29 10:56:34 +00:00
|
|
|
"render": function (data) {
|
2019-12-29 16:29:07 +00:00
|
|
|
if (data.exist === false) {
|
2020-01-01 22:15:50 +00:00
|
|
|
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>';
|
2019-12-29 16:29:07 +00:00
|
|
|
} else if (data.exist === true) {
|
2020-01-01 22:15:50 +00:00
|
|
|
return '<i class="fas fa-check" data-toggle="tooltip" data-placement="right" title="This path seems to be valid: ' + data.mapped_path + '"></i>';
|
2019-12-29 10:56:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{"data": "audio_language.name"},
|
|
|
|
{
|
|
|
|
"data": "languages",
|
|
|
|
"render": function (data) {
|
|
|
|
if (data !== 'None') {
|
|
|
|
var languages = '';
|
|
|
|
data.forEach(appendFunc);
|
|
|
|
return languages;
|
|
|
|
} else {
|
|
|
|
return null
|
|
|
|
}
|
2019-12-29 04:39:13 +00:00
|
|
|
|
2019-12-29 10:56:34 +00:00
|
|
|
function appendFunc(value) {
|
|
|
|
languages = languages + '<span class="badge badge-secondary" data-toggle="tooltip" data-placement="right" title="' + value.name + '">' + value.code2 + '</span> ';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2020-01-01 22:15:50 +00:00
|
|
|
{
|
|
|
|
"data": "hearing_impaired",
|
2019-12-29 16:29:07 +00:00
|
|
|
"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>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2020-01-01 22:15:50 +00:00
|
|
|
{
|
|
|
|
"data": "forced",
|
2019-12-29 16:29:07 +00:00
|
|
|
"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>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-12-29 10:56:34 +00:00
|
|
|
]
|
|
|
|
});
|
2020-01-07 10:02:16 +00:00
|
|
|
|
|
|
|
$('#movies').on('draw.dt', function () {
|
|
|
|
$('[data-toggle="tooltip"]').tooltip();
|
|
|
|
});
|
2019-12-29 10:56:34 +00:00
|
|
|
});
|
|
|
|
</script>
|
2019-12-28 05:52:00 +00:00
|
|
|
{% endblock tail %}
|