mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 03:52:33 +02:00
Fixed: Movies not getting unmonitored when folder gets deleted.
Fixes #1191, Fixes #1590
This commit is contained in:
parent
032fc68892
commit
0bc61bea38
@ -161,15 +161,9 @@ public void Scan(Movie movie)
|
||||
|
||||
if (!_diskProvider.FolderExists(movie.Path))
|
||||
{
|
||||
if (_configService.CreateEmptySeriesFolders &&
|
||||
_diskProvider.FolderExists(rootFolder))
|
||||
{
|
||||
_logger.Debug("Creating missing movies folder: {0}", movie.Path);
|
||||
_diskProvider.CreateFolder(movie.Path);
|
||||
SetPermissions(movie.Path);
|
||||
}
|
||||
else
|
||||
if (movie.MovieFileId != 0)
|
||||
{
|
||||
//Since there is no folder, there can't be any files right?
|
||||
// Delete Movie from MovieFiles
|
||||
_movieFileRepository.Delete(movie.MovieFileId);
|
||||
|
||||
@ -179,6 +173,13 @@ public void Scan(Movie movie)
|
||||
|
||||
_logger.Debug("Movies folder doesn't exist: {0}", movie.Path);
|
||||
}
|
||||
else if (_configService.CreateEmptySeriesFolders &&
|
||||
_diskProvider.FolderExists(rootFolder))
|
||||
{
|
||||
_logger.Debug("Creating missing movies folder: {0}", movie.Path);
|
||||
_diskProvider.CreateFolder(movie.Path);
|
||||
SetPermissions(movie.Path);
|
||||
}
|
||||
|
||||
_eventAggregator.PublishEvent(new MovieScanSkippedEvent(movie, MovieScanSkippedReason.MovieFolderDoesNotExist));
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user