mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
This commit is contained in:
parent
0c8e264668
commit
8de87bb516
@ -20,7 +20,7 @@ public interface IRecycleBinProvider
|
||||
void Cleanup();
|
||||
}
|
||||
|
||||
public class RecycleBinProvider : IHandleAsync<SeriesDeletedEvent>, IExecute<CleanUpRecycleBinCommand>, IRecycleBinProvider
|
||||
public class RecycleBinProvider : IHandleAsync<SeriesDeletedEvent>, IExecute<CleanUpRecycleBinCommand>, IRecycleBinProvider, IHandleAsync<MovieDeletedEvent>
|
||||
{
|
||||
private readonly IDiskTransferService _diskTransferService;
|
||||
private readonly IDiskProvider _diskProvider;
|
||||
@ -201,6 +201,17 @@ public void HandleAsync(SeriesDeletedEvent message)
|
||||
}
|
||||
}
|
||||
|
||||
public void HandleAsync(MovieDeletedEvent message)
|
||||
{
|
||||
if (message.DeleteFiles)
|
||||
{
|
||||
if (_diskProvider.FolderExists(message.Movie.Path))
|
||||
{
|
||||
DeleteFolder(message.Movie.Path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Execute(CleanUpRecycleBinCommand message)
|
||||
{
|
||||
Cleanup();
|
||||
|
Loading…
Reference in New Issue
Block a user