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

added movie and tv genre pages

This commit is contained in:
Luke Pulverenti 2013-04-11 15:36:50 -04:00
parent ceb6dffddb
commit 6f3b88353e
17 changed files with 294 additions and 90 deletions

View file

@ -1498,7 +1498,7 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
};
/**
* Gets items based on a query, typicall for children of a folder
* Gets items based on a query, typically for children of a folder
* @param {String} userId
* @param {Object} options
* Options accepts the following properties:
@ -1529,6 +1529,52 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
});
};
/**
Gets genres from an item
*/
self.getGenres = function (userId, options) {
if (!userId) {
throw new Error("null userId");
}
var parentId = options.parentId || "root";
// Don't put these on the query string
delete options.parentId;
var url = self.getUrl("Users/" + userId + "/Items/" + parentId + "/Genres", options);
return self.ajax({
type: "GET",
url: url,
dataType: "json"
});
};
/**
Gets studios from an item
*/
self.getStudios = function (userId, options) {
if (!userId) {
throw new Error("null userId");
}
var parentId = options.parentId || "root";
// Don't put these on the query string
delete options.parentId;
var url = self.getUrl("Users/" + userId + "/Items/" + parentId + "/Studios", options);
return self.ajax({
type: "GET",
url: url,
dataType: "json"
});
};
/**
* Gets local trailers for an item
*/