mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
updated live tv endpoints
This commit is contained in:
parent
7e5011f03d
commit
8d17f5f79e
18 changed files with 80 additions and 100 deletions
|
@ -1,9 +1,5 @@
|
|||
(function ($, document, apiClient) {
|
||||
|
||||
function playRecording(page, id) {
|
||||
|
||||
}
|
||||
|
||||
function deleteRecording(page, id) {
|
||||
|
||||
Dashboard.confirm("Are you sure you wish to delete this recording?", "Confirm Recording Deletion", function (result) {
|
||||
|
@ -27,36 +23,21 @@
|
|||
|
||||
var html = '';
|
||||
|
||||
var cssClass = "detailTable";
|
||||
|
||||
html += '<div class="detailTableContainer"><table class="' + cssClass + '">';
|
||||
|
||||
html += '<tr>';
|
||||
|
||||
html += '<th> </th>';
|
||||
html += '<th>Name</th>';
|
||||
html += '<th>Channel</th>';
|
||||
html += '<th>Date</th>';
|
||||
html += '<th>Start</th>';
|
||||
html += '<th>End</th>';
|
||||
html += '<th>Status</th>';
|
||||
|
||||
html += '</tr>';
|
||||
|
||||
for (var i = 0, length = recordings.length; i < length; i++) {
|
||||
|
||||
var recording = recordings[i];
|
||||
|
||||
html += '<tr>';
|
||||
|
||||
html += '<td>';
|
||||
html += '<button data-recordingid="' + recording.Id + '" class="btnPlayRecording" type="button" data-icon="play" data-inline="true" data-mini="true" data-iconpos="notext">Play</button>';
|
||||
html += '<td class="desktopColumn">';
|
||||
html += '<button data-recordingid="' + recording.Id + '" class="btnDeleteRecording" type="button" data-icon="delete" data-inline="true" data-mini="true" data-iconpos="notext">Delete</button>';
|
||||
html += '</td>';
|
||||
|
||||
html += '<td>' + (recording.Name || '') + '</td>';
|
||||
|
||||
html += '<td>';
|
||||
html += '<a href="livetvrecording.html?id=' + recording.Id + '">' + recording.Name + '</a>';
|
||||
html += '</td>';
|
||||
|
||||
html += '<td class="desktopColumn">';
|
||||
if (recording.ChannelId) {
|
||||
html += '<a href="livetvchannel.html?id=' + recording.ChannelId + '">' + recording.ChannelName + '</a>';
|
||||
}
|
||||
|
@ -76,23 +57,14 @@
|
|||
|
||||
html += '<td>' + LiveTvHelpers.getDisplayTime(recording.StartDate) + '</td>';
|
||||
|
||||
html += '<td>' + LiveTvHelpers.getDisplayTime(recording.EndDate) + '</td>';
|
||||
html += '<td class="tabletColumn">' + LiveTvHelpers.getDisplayTime(recording.EndDate) + '</td>';
|
||||
|
||||
html += '<td>' + (recording.Status || '') + '</td>';
|
||||
html += '<td class="tabletColumn">' + (recording.Status || '') + '</td>';
|
||||
|
||||
html += '</tr>';
|
||||
}
|
||||
|
||||
html += '</table></div>';
|
||||
|
||||
var elem = $('#items', page).html(html).trigger('create');
|
||||
|
||||
$('.btnPlayRecording', elem).on('click', function () {
|
||||
|
||||
var recordingId = this.getAttribute('data-recordingid');
|
||||
|
||||
playRecording(page, recordingId);
|
||||
});
|
||||
var elem = $('#table-column-toggle tbody', page).html(html).trigger('create');
|
||||
|
||||
$('.btnDeleteRecording', elem).on('click', function () {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue