mirror of https://github.com/Radarr/Radarr
This commit is contained in:
parent
0c8e264668
commit
8de87bb516
|
@ -20,7 +20,7 @@ namespace NzbDrone.Core.MediaFiles
|
||||||
void Cleanup();
|
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 IDiskTransferService _diskTransferService;
|
||||||
private readonly IDiskProvider _diskProvider;
|
private readonly IDiskProvider _diskProvider;
|
||||||
|
@ -201,6 +201,17 @@ namespace NzbDrone.Core.MediaFiles
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void HandleAsync(MovieDeletedEvent message)
|
||||||
|
{
|
||||||
|
if (message.DeleteFiles)
|
||||||
|
{
|
||||||
|
if (_diskProvider.FolderExists(message.Movie.Path))
|
||||||
|
{
|
||||||
|
DeleteFolder(message.Movie.Path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void Execute(CleanUpRecycleBinCommand message)
|
public void Execute(CleanUpRecycleBinCommand message)
|
||||||
{
|
{
|
||||||
Cleanup();
|
Cleanup();
|
||||||
|
|
Loading…
Reference in New Issue