aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-03-06 00:17:13 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-03-06 00:17:13 -0500
commit2349c8099d04c6c0631cd33e6c74b404381946ab (patch)
treeb348b662691135dc1d7ba0ae317b9966ac54d269 /MediaBrowser.Controller
parent9396f16aed2f304789324afc83e0c9f385c5f00a (diff)
start on manual collection creation
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Collections/CollectionCreationOptions.cs13
-rw-r--r--MediaBrowser.Controller/Collections/ICollectionManager.cs31
-rw-r--r--MediaBrowser.Controller/Entities/UserRootFolder.cs3
-rw-r--r--MediaBrowser.Controller/MediaBrowser.Controller.csproj2
4 files changed, 48 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Collections/CollectionCreationOptions.cs b/MediaBrowser.Controller/Collections/CollectionCreationOptions.cs
new file mode 100644
index 0000000000..d26bf5b352
--- /dev/null
+++ b/MediaBrowser.Controller/Collections/CollectionCreationOptions.cs
@@ -0,0 +1,13 @@
+using System;
+
+namespace MediaBrowser.Controller.Collections
+{
+ public class CollectionCreationOptions
+ {
+ public string Name { get; set; }
+
+ public Guid ParentId { get; set; }
+
+ public bool IsLocked { get; set; }
+ }
+}
diff --git a/MediaBrowser.Controller/Collections/ICollectionManager.cs b/MediaBrowser.Controller/Collections/ICollectionManager.cs
new file mode 100644
index 0000000000..a1e6b2c120
--- /dev/null
+++ b/MediaBrowser.Controller/Collections/ICollectionManager.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Threading.Tasks;
+
+namespace MediaBrowser.Controller.Collections
+{
+ public interface ICollectionManager
+ {
+ /// <summary>
+ /// Creates the collection.
+ /// </summary>
+ /// <param name="options">The options.</param>
+ /// <returns>Task.</returns>
+ Task CreateCollection(CollectionCreationOptions options);
+
+ /// <summary>
+ /// Adds to collection.
+ /// </summary>
+ /// <param name="collectionId">The collection identifier.</param>
+ /// <param name="itemId">The item identifier.</param>
+ /// <returns>Task.</returns>
+ Task AddToCollection(Guid collectionId, Guid itemId);
+
+ /// <summary>
+ /// Removes from collection.
+ /// </summary>
+ /// <param name="collectionId">The collection identifier.</param>
+ /// <param name="itemId">The item identifier.</param>
+ /// <returns>Task.</returns>
+ Task RemoveFromCollection(Guid collectionId, Guid itemId);
+ }
+}
diff --git a/MediaBrowser.Controller/Entities/UserRootFolder.cs b/MediaBrowser.Controller/Entities/UserRootFolder.cs
index 1829e10c72..0290fa39ad 100644
--- a/MediaBrowser.Controller/Entities/UserRootFolder.cs
+++ b/MediaBrowser.Controller/Entities/UserRootFolder.cs
@@ -1,4 +1,5 @@
using MediaBrowser.Controller.Providers;
+using System;
using System.Collections.Generic;
using System.Linq;
@@ -23,7 +24,7 @@ namespace MediaBrowser.Controller.Entities
{
var hasChanges = base.BeforeMetadataRefresh();
- if (string.Equals("default", Name, System.StringComparison.OrdinalIgnoreCase))
+ if (string.Equals("default", Name, StringComparison.OrdinalIgnoreCase))
{
Name = "Media Folders";
hasChanges = true;
diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
index ff446f2ef8..100ac9f4c4 100644
--- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj
+++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj
@@ -68,6 +68,8 @@
<Compile Include="..\SharedVersion.cs">
<Link>Properties\SharedVersion.cs</Link>
</Compile>
+ <Compile Include="Collections\CollectionCreationOptions.cs" />
+ <Compile Include="Collections\ICollectionManager.cs" />
<Compile Include="Drawing\IImageProcessor.cs" />
<Compile Include="Drawing\ImageFormat.cs" />
<Compile Include="Drawing\ImageProcessingOptions.cs" />