From b30bd9a1dfc52ff4581183acf5ddb214efc518da Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 11 Feb 2016 23:54:00 -0500 Subject: update recording deletion process --- MediaBrowser.Api/Library/LibraryService.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'MediaBrowser.Api/Library/LibraryService.cs') diff --git a/MediaBrowser.Api/Library/LibraryService.cs b/MediaBrowser.Api/Library/LibraryService.cs index 0563727d9..896f8c990 100644 --- a/MediaBrowser.Api/Library/LibraryService.cs +++ b/MediaBrowser.Api/Library/LibraryService.cs @@ -569,7 +569,7 @@ namespace MediaBrowser.Api.Library { throw new ArgumentException("This command cannot be used for remote or virtual items."); } - if (_fileSystem.DirectoryExists(item.Path)) + if (_fileSystem.DirectoryExists(item.Path)) { throw new ArgumentException("This command cannot be used for directories."); } @@ -789,12 +789,10 @@ namespace MediaBrowser.Api.Library return Task.FromResult(true); } - if (item is ILiveTvRecording) + return item.Delete(new DeleteOptions { - return _liveTv.DeleteRecording(i); - } - - return _libraryManager.DeleteItem(item); + DeleteFileLocation = true + }); }).ToArray(); Task.WaitAll(tasks); -- cgit v1.2.3