mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-13 01:33:04 +01:00
add search methods to remote metadata providers
This commit is contained in:
8
MediaBrowser.Controller/Library/DeleteOptions.cs
Normal file
8
MediaBrowser.Controller/Library/DeleteOptions.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
public class DeleteOptions
|
||||
{
|
||||
public bool DeleteFileLocation { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,7 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <param name="parent">The parent.</param>
|
||||
/// <returns>BaseItem.</returns>
|
||||
BaseItem ResolvePath(FileSystemInfo fileInfo, Folder parent = null);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Resolves a set of files into a list of BaseItem
|
||||
/// </summary>
|
||||
@@ -335,7 +335,19 @@ namespace MediaBrowser.Controller.Library
|
||||
/// Deletes the item.
|
||||
/// </summary>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <param name="options">The options.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task DeleteItem(BaseItem item);
|
||||
Task DeleteItem(BaseItem item, DeleteOptions options);
|
||||
}
|
||||
|
||||
public static class LibraryManagerExtensions
|
||||
{
|
||||
public static Task DeleteItem(this ILibraryManager manager, BaseItem item)
|
||||
{
|
||||
return manager.DeleteItem(item, new DeleteOptions
|
||||
{
|
||||
DeleteFileLocation = true
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user