mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-10 00:37:49 +08:00
WIP
This commit is contained in:
parent
c2de011fad
commit
b0c82174be
1 changed files with 73 additions and 1 deletions
|
@ -263,6 +263,37 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="episodeHistoryModal " class="modal" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><span id="episode_history_title_span"></span></h5><br>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<table id="episode_result" class="display" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th style="text-align: left;">Language.:</th>
|
||||
<th style="text-align: left;">Provider:</th>
|
||||
<th style="text-align: left;">Score:</th>
|
||||
<th style="text-align: left;">Date:</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock body %}
|
||||
|
||||
{% block tail %}
|
||||
|
@ -308,7 +339,11 @@
|
|||
}
|
||||
},
|
||||
{"data": "episode"},
|
||||
{"data": "title"},
|
||||
{"data": null,
|
||||
"render": function (data) {
|
||||
return '<a href="" data-season='+data.season+' data-episode='+data.episode+' data-episode_title="'+data.title+'" data-sonarrEpisodeId='+data.sonarrEpisodeId+' class="episode_history">'+data.title+'</a>';
|
||||
}
|
||||
},
|
||||
{"data": null,
|
||||
"render": function (data) {
|
||||
if (data.subtitles !== null) {
|
||||
|
@ -705,6 +740,43 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('.episode_history').on('click', function(e){
|
||||
e.preventDefault();
|
||||
|
||||
$("#episode_history_title_span").html(seriesDetails['title'] + ' - ' + $(this).data("season") + 'x' + $(this).data("episode") + ' - ' + $(this).data("episode_title"));
|
||||
|
||||
sonarrEpisodeId = $(this).data("sonarrEpisodeId");
|
||||
|
||||
$('#episode_result').DataTable( {
|
||||
destroy: true,
|
||||
language: {
|
||||
zeroRecords: 'No History Records Found For This Episode'
|
||||
},
|
||||
paging: true,
|
||||
lengthChange: false,
|
||||
pageLength: 5,
|
||||
searching: true,
|
||||
ordering: true,
|
||||
processing: false,
|
||||
serverSide: false,
|
||||
ajax: {
|
||||
url: '/bazarr-dev/episode_history/' + sonarrEpisodeId
|
||||
},
|
||||
columns: [
|
||||
{ data: 'action'},
|
||||
{ data: 'language' },
|
||||
{ data: 'provider' },
|
||||
{ data: 'score'},
|
||||
{ data: 'timestamp' }
|
||||
]
|
||||
} );
|
||||
|
||||
$('#episodeHistoryModal ')
|
||||
.modal({
|
||||
focus: false
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function seriesDetailsRefresh() {
|
||||
|
|
Loading…
Reference in a new issue