aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.WebDashboard/ApiClient.js
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.WebDashboard/ApiClient.js')
-rw-r--r--MediaBrowser.WebDashboard/ApiClient.js42
1 files changed, 42 insertions, 0 deletions
diff --git a/MediaBrowser.WebDashboard/ApiClient.js b/MediaBrowser.WebDashboard/ApiClient.js
index 5381a7abd..0f014f870 100644
--- a/MediaBrowser.WebDashboard/ApiClient.js
+++ b/MediaBrowser.WebDashboard/ApiClient.js
@@ -1517,6 +1517,48 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
};
/**
+ * Gets local trailers for an item
+ */
+ self.getLocalTrailers = function (userId, itemId) {
+
+ if (!userId) {
+ throw new Error("null userId");
+ }
+ if (!itemId) {
+ throw new Error("null itemId");
+ }
+
+ var url = self.getUrl("Users/" + userId + "/Items/" + itemId + "/LocalTrailers");
+
+ return self.ajax({
+ type: "GET",
+ url: url,
+ dataType: "json"
+ });
+ };
+
+ /**
+ * Gets special features for an item
+ */
+ self.getSpecialFeatures = function (userId, itemId) {
+
+ if (!userId) {
+ throw new Error("null userId");
+ }
+ if (!itemId) {
+ throw new Error("null itemId");
+ }
+
+ var url = self.getUrl("Users/" + userId + "/Items/" + itemId + "/SpecialFeatures");
+
+ return self.ajax({
+ type: "GET",
+ url: url,
+ dataType: "json"
+ });
+ };
+
+ /**
* Marks an item as played or unplayed
* This should not be used to update playstate following playback.
* There are separate playstate check-in methods for that. This should be used for a