1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

graphical display of latest recordings

This commit is contained in:
Luke Pulverenti 2013-12-28 18:09:24 -05:00
parent f225e4fa92
commit f9ec680145
4 changed files with 85 additions and 20 deletions

View file

@ -18,7 +18,7 @@
});
}
function loadRecordings(page, elem, groupId) {
var contentElem = $('.recordingList', elem).html('<div class="circle"></div><div class="circle1"></div>');
@ -39,7 +39,7 @@
var html = '';
html += '<div data-role="collapsible" class="recordingGroupCollapsible" data-recordinggroupid="' + group.Id + '" style="margin-top:1em" data-mini="true">';
html += '<div data-role="collapsible" class="recordingGroupCollapsible" data-recordinggroupid="' + group.Id + '" style="margin-top:1em">';
html += '<h3>' + group.Name + '</h3>';
@ -53,6 +53,12 @@
function renderRecordingGroups(page, groups) {
if (groups.length) {
$('#recordingGroups', page).show();
} else {
$('#recordingGroups', page).hide();
}
var html = '';
for (var i = 0, length = groups.length; i < length; i++) {
@ -60,7 +66,7 @@
html += getRecordingGroupHtml(groups[i]);
}
var elem = $('#items', page).html(html).trigger('create');
var elem = $('#recordingGroupItems', page).html(html).trigger('create');
$('.recordingGroupCollapsible', elem).on('collapsibleexpand.lazyload', function () {
@ -133,6 +139,25 @@
Dashboard.hideLoadingMsg();
}
function renderLatestRecordings(page, recordings) {
if (recordings.length) {
$('#latestRecordings', page).show();
} else {
$('#latestRecordings', page).hide();
}
$('#latestRecordingItems', page).html(LibraryBrowser.getPosterViewHtml({
items: recordings,
useAverageAspectRatio: true,
shape: "smallBackdrop",
showTitle: true,
showParentTitle: true,
overlayText: true
}));
}
function reload(page) {
@ -147,6 +172,17 @@
renderRecordingGroups(page, result.Items);
});
apiClient.getLiveTvRecordings({
userId: Dashboard.getCurrentUserId(),
limit: 6
}).done(function (result) {
renderLatestRecordings(page, result.Items);
});
}
$(document).on('pagebeforeshow', "#liveTvRecordingsPage", function () {