mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix channel query by category
This commit is contained in:
parent
2cae955857
commit
382c0e393c
3 changed files with 21 additions and 10 deletions
|
@ -9,7 +9,7 @@
|
|||
};
|
||||
|
||||
function getSavedQueryId() {
|
||||
return 'channels-' + getParameterByName('id') + (getParameterByName('categoryId') || '');
|
||||
return 'channels-' + (getParameterByName('categoryId') || '');
|
||||
}
|
||||
|
||||
function showLoadingMessage(page) {
|
||||
|
@ -35,6 +35,10 @@
|
|||
$('.categoryTitle', page).html(item.Name);
|
||||
});
|
||||
|
||||
if (categoryId) {
|
||||
query.categoryId = categoryId;
|
||||
}
|
||||
|
||||
$.getJSON(ApiClient.getUrl("Channels/" + channelId + "/Items", query)).done(function (result) {
|
||||
|
||||
// Scroll back up so they can see the results from the beginning
|
||||
|
|
|
@ -479,9 +479,14 @@
|
|||
if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1.777777778) < .3) {
|
||||
options.shape = 'backdrop';
|
||||
}
|
||||
else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1) < .3) {
|
||||
else if (primaryImageAspectRatio && Math.abs(primaryImageAspectRatio - 1) < .34) {
|
||||
options.coverImage = true;
|
||||
options.shape = 'square';
|
||||
}
|
||||
else if (primaryImageAspectRatio && primaryImageAspectRatio > 1.9) {
|
||||
options.shape = 'banner';
|
||||
options.coverImage = true;
|
||||
}
|
||||
else {
|
||||
options.shape = 'portrait';
|
||||
}
|
||||
|
|
|
@ -78,6 +78,14 @@
|
|||
|
||||
function showLibraryMenu() {
|
||||
|
||||
var panel = getLibraryMenu();
|
||||
|
||||
updateLibraryNavLinks($.mobile.activePage);
|
||||
|
||||
$(panel).panel('toggle');
|
||||
}
|
||||
|
||||
function updateLibraryMenu(panel) {
|
||||
var userId = Dashboard.getCurrentUserId();
|
||||
|
||||
ApiClient.getItems(userId, {
|
||||
|
@ -99,14 +107,6 @@
|
|||
$('.libraryMenuOptions').html(html);
|
||||
});
|
||||
|
||||
var page = $.mobile.activePage;
|
||||
|
||||
var panel = getLibraryMenu();
|
||||
|
||||
updateLibraryNavLinks(page);
|
||||
|
||||
$(panel).panel('toggle');
|
||||
|
||||
ApiClient.getLiveTvInfo().done(function (liveTvInfo) {
|
||||
|
||||
var showLiveTv = liveTvInfo.EnabledUsers.indexOf(userId) != -1;
|
||||
|
@ -163,6 +163,8 @@
|
|||
$(document.body).append(html);
|
||||
|
||||
panel = $('#libraryPanel').panel({}).trigger('create');
|
||||
|
||||
updateLibraryMenu();
|
||||
}
|
||||
|
||||
return panel;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue