aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs5
-rw-r--r--MediaBrowser.Controller/Library/LibraryManagerExtensions.cs8
-rw-r--r--MediaBrowser.Controller/LiveTv/ILiveTvManager.cs7
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs7
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs7
5 files changed, 26 insertions, 8 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index 379697b81..d52e2b37f 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -1980,5 +1980,10 @@ namespace MediaBrowser.Controller.Entities
{
return new[] { Id };
}
+
+ public virtual Task Delete(DeleteOptions options)
+ {
+ return LibraryManager.DeleteItem(this, options);
+ }
}
} \ No newline at end of file
diff --git a/MediaBrowser.Controller/Library/LibraryManagerExtensions.cs b/MediaBrowser.Controller/Library/LibraryManagerExtensions.cs
index dd1c9c07a..4c9831bf9 100644
--- a/MediaBrowser.Controller/Library/LibraryManagerExtensions.cs
+++ b/MediaBrowser.Controller/Library/LibraryManagerExtensions.cs
@@ -6,14 +6,6 @@ namespace MediaBrowser.Controller.Library
{
public static class LibraryManagerExtensions
{
- public static Task DeleteItem(this ILibraryManager manager, BaseItem item)
- {
- return manager.DeleteItem(item, new DeleteOptions
- {
- DeleteFileLocation = true
- });
- }
-
public static BaseItem GetItemById(this ILibraryManager manager, string id)
{
return manager.GetItemById(new Guid(id));
diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
index 241b01405..3d9354433 100644
--- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
+++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs
@@ -45,6 +45,13 @@ namespace MediaBrowser.Controller.LiveTv
Task DeleteRecording(string id);
/// <summary>
+ /// Deletes the recording.
+ /// </summary>
+ /// <param name="recording">The recording.</param>
+ /// <returns>Task.</returns>
+ Task DeleteRecording(ILiveTvRecording recording);
+
+ /// <summary>
/// Cancels the timer.
/// </summary>
/// <param name="id">The identifier.</param>
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
index d9834c191..c3d843f85 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
@@ -9,6 +9,8 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
+using System.Threading.Tasks;
+using MediaBrowser.Controller.Library;
namespace MediaBrowser.Controller.LiveTv
{
@@ -144,5 +146,10 @@ namespace MediaBrowser.Controller.LiveTv
{
return IsVisible(user);
}
+
+ public override Task Delete(DeleteOptions options)
+ {
+ return LiveTvManager.DeleteRecording(this);
+ }
}
}
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
index c58b5502b..5492a29f3 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
@@ -9,6 +9,8 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
+using System.Threading.Tasks;
+using MediaBrowser.Controller.Library;
namespace MediaBrowser.Controller.LiveTv
{
@@ -159,5 +161,10 @@ namespace MediaBrowser.Controller.LiveTv
{
return IsVisible(user);
}
+
+ public override Task Delete(DeleteOptions options)
+ {
+ return LiveTvManager.DeleteRecording(this);
+ }
}
}