From 13e4b2a6a76df957a85e444822c816b42f2bb60c Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 19 Feb 2014 23:53:15 -0500 Subject: add search methods to remote metadata providers --- MediaBrowser.Controller/Library/DeleteOptions.cs | 8 ++++++++ MediaBrowser.Controller/Library/ILibraryManager.cs | 16 ++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 MediaBrowser.Controller/Library/DeleteOptions.cs (limited to 'MediaBrowser.Controller/Library') diff --git a/MediaBrowser.Controller/Library/DeleteOptions.cs b/MediaBrowser.Controller/Library/DeleteOptions.cs new file mode 100644 index 000000000..81ed90899 --- /dev/null +++ b/MediaBrowser.Controller/Library/DeleteOptions.cs @@ -0,0 +1,8 @@ + +namespace MediaBrowser.Controller.Library +{ + public class DeleteOptions + { + public bool DeleteFileLocation { get; set; } + } +} diff --git a/MediaBrowser.Controller/Library/ILibraryManager.cs b/MediaBrowser.Controller/Library/ILibraryManager.cs index a34cfa78e..0b1ac9137 100644 --- a/MediaBrowser.Controller/Library/ILibraryManager.cs +++ b/MediaBrowser.Controller/Library/ILibraryManager.cs @@ -41,7 +41,7 @@ namespace MediaBrowser.Controller.Library /// The parent. /// BaseItem. BaseItem ResolvePath(FileSystemInfo fileInfo, Folder parent = null); - + /// /// Resolves a set of files into a list of BaseItem /// @@ -335,7 +335,19 @@ namespace MediaBrowser.Controller.Library /// Deletes the item. /// /// The item. + /// The options. /// Task. - 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 + }); + } } } \ No newline at end of file -- cgit v1.2.3