mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update genre queries
This commit is contained in:
parent
b7c966a72c
commit
70994b54a6
4 changed files with 15 additions and 4 deletions
|
@ -320,6 +320,10 @@
|
||||||
|
|
||||||
function getMoreItemsHref(item, type) {
|
function getMoreItemsHref(item, type) {
|
||||||
|
|
||||||
|
if (item.Type == 'Genre' || item.Type == 'MusicGenre' || item.Type == 'GameGenre') {
|
||||||
|
return 'secondaryitems.html?type=' + type + '&genreId=' + item.Id + '&parentId=' + params.topParentId;
|
||||||
|
}
|
||||||
|
|
||||||
return 'secondaryitems.html?type=' + type + '&parentId=' + item.Id;
|
return 'secondaryitems.html?type=' + type + '&parentId=' + item.Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
|
|
||||||
function getMoreItemsHref(itemId, type) {
|
function getMoreItemsHref(itemId, type) {
|
||||||
|
|
||||||
return 'secondaryitems.html?type=' + type + '&parentId=' + itemId;
|
return 'secondaryitems.html?type=' + type + '&genreId=' + itemId + '&parentId=' + params.topParentId;
|
||||||
}
|
}
|
||||||
|
|
||||||
dom.addEventListener(tabContent, 'click', function (e) {
|
dom.addEventListener(tabContent, 'click', function (e) {
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
|
|
||||||
function addCurrentItemToQuery(query, item) {
|
function addCurrentItemToQuery(query, item) {
|
||||||
|
|
||||||
|
if (params.parentId) {
|
||||||
|
query.ParentId = params.parentId;
|
||||||
|
}
|
||||||
|
|
||||||
if (item.Type == "Person") {
|
if (item.Type == "Person") {
|
||||||
query.PersonIds = item.Id;
|
query.PersonIds = item.Id;
|
||||||
}
|
}
|
||||||
|
@ -218,8 +222,11 @@
|
||||||
view.addEventListener('click', onListItemClick);
|
view.addEventListener('click', onListItemClick);
|
||||||
|
|
||||||
view.addEventListener('viewbeforeshow', function (e) {
|
view.addEventListener('viewbeforeshow', function (e) {
|
||||||
if (params.parentId) {
|
|
||||||
ApiClient.getItem(Dashboard.getCurrentUserId(), params.parentId).then(function (parent) {
|
var parentId = params.genreId || params.parentId;
|
||||||
|
|
||||||
|
if (parentId) {
|
||||||
|
ApiClient.getItem(Dashboard.getCurrentUserId(), parentId).then(function (parent) {
|
||||||
LibraryMenu.setTitle(parent.Name);
|
LibraryMenu.setTitle(parent.Name);
|
||||||
|
|
||||||
onViewStyleChange(parent);
|
onViewStyleChange(parent);
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
|
|
||||||
function getMoreItemsHref(itemId, type) {
|
function getMoreItemsHref(itemId, type) {
|
||||||
|
|
||||||
return 'secondaryitems.html?type=' + type + '&parentId=' + itemId;
|
return 'secondaryitems.html?type=' + type + '&genreId=' + itemId + '&parentId=' + params.topParentId;
|
||||||
}
|
}
|
||||||
|
|
||||||
dom.addEventListener(tabContent, 'click', function (e) {
|
dom.addEventListener(tabContent, 'click', function (e) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue