#680 - episode organization

This commit is contained in:
Luke Pulverenti
2014-01-22 12:05:06 -05:00
parent cf1dac60f6
commit 9d40b684bf
21 changed files with 824 additions and 646 deletions

View File

@@ -687,6 +687,16 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
});
};
self.clearOrganizationLog = function () {
var url = self.getUrl("Library/FileOrganizations");
return self.ajax({
type: "DELETE",
url: url
});
};
self.performOrganization = function (id) {
var url = self.getUrl("Library/FileOrganizations/" + id + "/Organize");
@@ -697,6 +707,16 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
});
};
self.performEpisodeOrganization = function (id, options) {
var url = self.getUrl("Library/FileOrganizations/" + id + "/Episode/Organize", options || {});
return self.ajax({
type: "POST",
url: url
});
};
self.getLiveTvSeriesTimer = function (id) {
if (!id) {
@@ -2984,7 +3004,14 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
throw new Error("null userId");
}
var url = self.getUrl("Users/" + userId + "/Items", options);
var url;
if ((typeof userId).toString().toLowerCase() == 'string') {
url = self.getUrl("Users/" + userId + "/Items", options);
} else {
options = userId;
url = self.getUrl("Items", options || {});
}
return self.ajax({
type: "GET",