2019-12-28 06:15:56 +08:00
|
|
|
{% extends '_main.html' %}
|
2018-12-10 04:23:51 +08:00
|
|
|
|
2019-12-28 06:15:56 +08:00
|
|
|
{% block title %}Series - Bazarr{% endblock %}
|
2018-12-10 04:23:51 +08:00
|
|
|
|
2019-12-29 00:43:48 +08:00
|
|
|
{% block head %}
|
2018-12-10 04:23:51 +08:00
|
|
|
|
2019-12-28 06:15:56 +08:00
|
|
|
{% endblock head %}
|
2018-12-10 04:23:51 +08:00
|
|
|
|
2019-12-29 00:43:48 +08:00
|
|
|
{% block body %}
|
|
|
|
<table id="series" class="mdl-data-table" style="width:100%">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
2019-12-29 12:39:13 +08:00
|
|
|
<th>Exist</th>
|
2019-12-29 00:43:48 +08:00
|
|
|
<th>Audio Language</th>
|
|
|
|
<th>Subtitles Languages</th>
|
|
|
|
<th>Hearing-Impaired</th>
|
|
|
|
<th>Forced</th>
|
2019-12-29 12:39:13 +08:00
|
|
|
<th>Subtitles</th>
|
2019-12-29 00:43:48 +08:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</table>
|
2019-12-28 06:15:56 +08:00
|
|
|
{% endblock body %}
|
2018-12-10 04:23:51 +08:00
|
|
|
|
2019-12-29 00:43:48 +08:00
|
|
|
{% block tail %}
|
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
|
|
|
var table = $('#series').DataTable( {
|
|
|
|
"processing": true,
|
|
|
|
"serverSide": true,
|
|
|
|
"searching": false,
|
|
|
|
"ordering": false,
|
|
|
|
"lengthChange": false,
|
|
|
|
"ajax": "/api/series",
|
|
|
|
"columns": [
|
|
|
|
{ "data": "title" },
|
2019-12-29 12:39:13 +08:00
|
|
|
{ "data": "exist",
|
|
|
|
"render": function ( data ) {
|
|
|
|
if (data === false) {
|
|
|
|
return '<i class="fas fa-exclamation-triangle" data-toggle="tooltip" data-placement="right" title="This path doesn\'t seem to be valid."></i>';
|
|
|
|
} else if (data === true) {
|
|
|
|
return '<i class="fas fa-check" data-toggle="tooltip" data-placement="right" title="This path seems to be valid."></i>';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2019-12-29 00:43:48 +08:00
|
|
|
{ "data": "audio_language.name" },
|
2019-12-29 12:39:13 +08:00
|
|
|
{ "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> ';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2019-12-29 00:43:48 +08:00
|
|
|
{ "data": "hearing_impaired" },
|
2019-12-29 12:39:13 +08:00
|
|
|
{ "data": "forced" },
|
|
|
|
{ "data": null,
|
|
|
|
"render": function ( data ) {
|
|
|
|
var total = data.episodeFileCount;
|
|
|
|
var completed = data.episodeFileCount - data.episodeMissingCount;
|
|
|
|
var completed_style = '';
|
|
|
|
var completed_text = '';
|
|
|
|
if (completed/total*100 > 0 && data.languages !== 'None') {
|
|
|
|
completed_style = ' style="width: '+completed/total*100+'%;"';
|
|
|
|
completed_text = completed+'/'+total;
|
|
|
|
}
|
|
|
|
return '<div class="progress"><div class="progress-bar" role="progressbar"'+completed_style+' aria-valuenow="'+completed+'" aria-valuemin="0" aria-valuemax="'+total+'">'+completed_text+'</div></div>'
|
|
|
|
}
|
|
|
|
}
|
2019-12-29 00:43:48 +08:00
|
|
|
]
|
|
|
|
} );
|
|
|
|
} );
|
|
|
|
</script>
|
2019-12-28 06:15:56 +08:00
|
|
|
{% endblock tail %}
|