diff options
Diffstat (limited to 'MediaBrowser.Controller/Library')
| -rw-r--r-- | MediaBrowser.Controller/Library/DeleteOptions.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Library/ILibraryManager.cs | 16 |
2 files changed, 22 insertions, 2 deletions
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 /// <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 + }); + } } }
\ No newline at end of file |
