mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
40 lines
976 B
JavaScript
40 lines
976 B
JavaScript
|
(function ($, document) {
|
|||
|
|
|||
|
function reloadItems(page) {
|
|||
|
|
|||
|
Dashboard.showLoadingMsg();
|
|||
|
|
|||
|
var options = {
|
|||
|
|
|||
|
Limit: 30,
|
|||
|
Fields: "PrimaryImageAspectRatio",
|
|||
|
Filters: "IsUnplayed",
|
|||
|
UserId: Dashboard.getCurrentUserId()
|
|||
|
};
|
|||
|
|
|||
|
$.getJSON(ApiClient.getUrl("Channels/Items/Latest", options)).done(function (result) {
|
|||
|
|
|||
|
var html = '';
|
|||
|
|
|||
|
html += LibraryBrowser.getPosterViewHtml({
|
|||
|
items: result.Items,
|
|||
|
shape: 'auto',
|
|||
|
showTitle: true,
|
|||
|
centerText: true,
|
|||
|
context: 'channels',
|
|||
|
lazy: true
|
|||
|
});
|
|||
|
|
|||
|
$("#items", page).html(html).trigger('create').createPosterItemMenus();
|
|||
|
|
|||
|
Dashboard.hideLoadingMsg();
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
$(document).on('pagebeforeshow', "#channelsLatestPage", function () {
|
|||
|
|
|||
|
reloadItems(this);
|
|||
|
|
|||
|
});
|
|||
|
|
|||
|
})(jQuery, document);
|