From e796413aedc4bc0e107eaf1a6b71508fd0e0d6d7 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 12 Jul 2013 15:56:40 -0400 Subject: [PATCH] added collection type --- ApiClient.js | 10 ++- dashboard-ui/library.html | 15 ++++- dashboard-ui/scripts/itembynamedetailpage.js | 2 +- dashboard-ui/scripts/medialibrarypage.js | 64 +++++++++++++++++--- dashboard-ui/scripts/remotecontrol.js | 14 ++--- dashboard-ui/wizardlibrary.html | 15 ++++- packages.config | 2 +- 7 files changed, 100 insertions(+), 22 deletions(-) diff --git a/ApiClient.js b/ApiClient.js index 637e2e549a..6228c9106b 100644 --- a/ApiClient.js +++ b/ApiClient.js @@ -896,16 +896,22 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout) { * Adds a virtual folder to either the default view or a user view * @param {String} name */ - self.addVirtualFolder = function (name, userId) { + self.addVirtualFolder = function (name, type, userId) { if (!name) { throw new Error("null name"); } + var options = {}; + + if (type) { + options.collectionType = type; + } + var url = userId ? "Users/" + userId + "/VirtualFolders" : "Library/VirtualFolders"; url += "/" + name; - url = self.getUrl(url); + url = self.getUrl(url, options); return self.ajax({ type: "POST", diff --git a/dashboard-ui/library.html b/dashboard-ui/library.html index f34ff099a8..dd3b470d27 100644 --- a/dashboard-ui/library.html +++ b/dashboard-ui/library.html @@ -43,8 +43,19 @@
- - +

+ + +

+ +

+ + +

+ +

+ Anything not listed, including custom media types supported by plugins (e.g. photos, games) should be classified as general or mixed content. +