diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-07-12 15:56:40 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-07-12 15:56:40 -0400 |
| commit | dab5003d6bba57c27f4111653b36d39862b5b6fd (patch) | |
| tree | bdf7462c3718eb729f71b1245c3f651b016e8412 /MediaBrowser.Api/Library/LibraryHelpers.cs | |
| parent | 3370fb072e71ad93c540d50d859d6cbe85552735 (diff) | |
added collection type
Diffstat (limited to 'MediaBrowser.Api/Library/LibraryHelpers.cs')
| -rw-r--r-- | MediaBrowser.Api/Library/LibraryHelpers.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/MediaBrowser.Api/Library/LibraryHelpers.cs b/MediaBrowser.Api/Library/LibraryHelpers.cs index ab7449273..72cff4560 100644 --- a/MediaBrowser.Api/Library/LibraryHelpers.cs +++ b/MediaBrowser.Api/Library/LibraryHelpers.cs @@ -16,10 +16,11 @@ namespace MediaBrowser.Api.Library /// Adds the virtual folder. /// </summary> /// <param name="name">The name.</param> + /// <param name="collectionType">Type of the collection.</param> /// <param name="user">The user.</param> /// <param name="appPaths">The app paths.</param> /// <exception cref="System.ArgumentException">There is already a media collection with the name + name + .</exception> - public static void AddVirtualFolder(string name, User user, IServerApplicationPaths appPaths) + public static void AddVirtualFolder(string name, string collectionType, User user, IServerApplicationPaths appPaths) { name = FileSystem.GetValidFilename(name); @@ -32,6 +33,13 @@ namespace MediaBrowser.Api.Library } Directory.CreateDirectory(virtualFolderPath); + + if (!string.IsNullOrEmpty(collectionType)) + { + var path = Path.Combine(virtualFolderPath, collectionType + ".collection"); + + File.Create(path); + } } /// <summary> |
