mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-19 04:34:18 +01:00
start on manual collection creation
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
31
MediaBrowser.Controller/Collections/ICollectionManager.cs
Normal file
31
MediaBrowser.Controller/Collections/ICollectionManager.cs
Normal file
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user