aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.WebDashboard/ApiClient.js
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-05-15 12:56:38 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-05-15 12:56:38 -0400
commit59d576ba09ca46e5ea7c1a300d82f3dc586b244e (patch)
tree862460e02cc8bea2fa1aa727797132908831d9d9 /MediaBrowser.WebDashboard/ApiClient.js
parent58cc2248b9fc0daca3110527086612b4a99cfcf1 (diff)
updated theme song/video url's
Diffstat (limited to 'MediaBrowser.WebDashboard/ApiClient.js')
-rw-r--r--MediaBrowser.WebDashboard/ApiClient.js22
1 files changed, 14 insertions, 8 deletions
diff --git a/MediaBrowser.WebDashboard/ApiClient.js b/MediaBrowser.WebDashboard/ApiClient.js
index a44bdc4d2..04c85c5c8 100644
--- a/MediaBrowser.WebDashboard/ApiClient.js
+++ b/MediaBrowser.WebDashboard/ApiClient.js
@@ -1883,14 +1883,17 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
*/
self.getThemeSongs = 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 + "/ThemeSongs");
+ var options = {};
+
+ if (userId) {
+ options.userId = userId;
+ }
+
+ var url = self.getUrl("Items/" + itemId + "/ThemeSongs", options);
return self.ajax({
type: "GET",
@@ -1901,14 +1904,17 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) {
self.getThemeVideos = 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 + "/ThemeVideos");
+ var options = {};
+
+ if (userId) {
+ options.userId = userId;
+ }
+
+ var url = self.getUrl("Items/" + itemId + "/ThemeVideos", options);
return self.ajax({
type: "GET",