mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 00:55:13 +01:00
update recording deletion process
This commit is contained in:
@@ -1673,6 +1673,11 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||
throw new ResourceNotFoundException(string.Format("Recording with Id {0} not found", recordingId));
|
||||
}
|
||||
|
||||
await DeleteRecording(recording).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public async Task DeleteRecording(ILiveTvRecording recording)
|
||||
{
|
||||
var service = GetService(recording.ServiceName);
|
||||
|
||||
try
|
||||
@@ -1685,7 +1690,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
|
||||
}
|
||||
|
||||
_lastRecordingRefreshTime = DateTime.MinValue;
|
||||
|
||||
|
||||
// This is the responsibility of the live tv service
|
||||
await _libraryManager.DeleteItem((BaseItem)recording, new DeleteOptions
|
||||
{
|
||||
|
||||
@@ -205,10 +205,11 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
{
|
||||
_logger.Info("Cleaning item {0} type: {1} path: {2}", item.Name, item.GetType().Name, item.Path ?? string.Empty);
|
||||
|
||||
await _libraryManager.DeleteItem(item, new DeleteOptions
|
||||
await item.Delete(new DeleteOptions
|
||||
{
|
||||
DeleteFileLocation = false
|
||||
});
|
||||
|
||||
}).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
numComplete++;
|
||||
@@ -274,10 +275,11 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
|
||||
_logger.Info("Deleting item from database {0} because path no longer exists. type: {1} path: {2}", libraryItem.Name, libraryItem.GetType().Name, libraryItem.Path ?? string.Empty);
|
||||
|
||||
await _libraryManager.DeleteItem(libraryItem, new DeleteOptions
|
||||
await libraryItem.Delete(new DeleteOptions
|
||||
{
|
||||
DeleteFileLocation = false
|
||||
});
|
||||
|
||||
}).ConfigureAwait(false);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user