From b0c82174bee7d111f12569a26ecca40c1acb0c49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Louis=20V=C3=A9zina?=
<5130500+morpheus65535@users.noreply.github.com>
Date: Wed, 22 Jan 2020 20:03:04 -0500
Subject: [PATCH] WIP
---
views/episodes.html | 74 ++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 73 insertions(+), 1 deletion(-)
diff --git a/views/episodes.html b/views/episodes.html
index fe0f7b6c8..c1832b8bf 100644
--- a/views/episodes.html
+++ b/views/episodes.html
@@ -263,6 +263,37 @@
+
+
+
+
+
+
+
+
+
+
+ |
+ Language.: |
+ Provider: |
+ Score: |
+ Date: |
+
+
+
+
+
+
+
+
+
{% endblock body %}
{% block tail %}
@@ -308,7 +339,11 @@
}
},
{"data": "episode"},
- {"data": "title"},
+ {"data": null,
+ "render": function (data) {
+ return ''+data.title+'';
+ }
+ },
{"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() {