Skip to content

Commit

Permalink
update genre queries
Browse files Browse the repository at this point in the history
  • Loading branch information
LukePulverenti committed Nov 25, 2016
1 parent 5e1d2d5 commit ebb389f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@

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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

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) {
Expand Down
11 changes: 9 additions & 2 deletions MediaBrowser.WebDashboard/dashboard-ui/scripts/secondaryitems.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

function addCurrentItemToQuery(query, item) {

if (params.parentId) {
query.ParentId = params.parentId;
}

if (item.Type == "Person") {
query.PersonIds = item.Id;
}
Expand Down Expand Up @@ -218,8 +222,11 @@
view.addEventListener('click', onListItemClick);

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);

onViewStyleChange(parent);
Expand Down
2 changes: 1 addition & 1 deletion MediaBrowser.WebDashboard/dashboard-ui/scripts/tvgenres.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

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) {
Expand Down

0 comments on commit ebb389f

Please sign in to comment.