aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Library/LibraryService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/Library/LibraryService.cs')
-rw-r--r--MediaBrowser.Api/Library/LibraryService.cs10
1 files changed, 4 insertions, 6 deletions
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);