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

support sending channel paging direct to the provider

This commit is contained in:
Luke Pulverenti 2014-05-19 15:51:56 -04:00
parent 704fa77349
commit 88bcd847e2
7 changed files with 44 additions and 13 deletions

View file

@ -30,13 +30,26 @@
query.UserId = Dashboard.getCurrentUserId();
ApiClient.getItem(query.UserId, categoryId || channelId).done(function (item) {
$('.categoryTitle', page).html(item.Name);
});
if (categoryId) {
ApiClient.getItem(query.UserId, categoryId).done(function (item) {
$('.categoryTitle', page).show().html(item.Name);
$('.channelHeader', page).show().html('<a href="channelitems.html?id=' + item.ChannelId + '">' + item.ChannelName + '</a>').trigger('create');
});
} else {
ApiClient.getItem(query.UserId, channelId).done(function (item) {
$('.categoryTitle', page).hide().html(item.Name);
$('.channelHeader', page).show().html('<a href="channelitems.html?id=' + item.Id + '">' + item.Name + '</a>');
});
}
query.categoryId = categoryId;
query.Limit = 50;
$.getJSON(ApiClient.getUrl("Channels/" + channelId + "/Items", query)).done(function (result) {
// Scroll back up so they can see the results from the beginning
@ -79,9 +92,9 @@
LibraryBrowser.saveQueryValues(getSavedQueryId(), query);
}).always(function() {
}).always(function () {
hideLoadingMessage(page);
});
}
@ -171,8 +184,8 @@
// If the default page size has changed, the start index will have to be reset
if (limit != query.Limit) {
query.Limit = limit;
query.StartIndex = 0;
}
query.StartIndex = 0;
LibraryBrowser.loadSavedQueryValues(getSavedQueryId(), query);