From bbde1dc7a6399406d42bf159eef1d4239f65eda5 Mon Sep 17 00:00:00 2001 From: Qstick Date: Sun, 9 Jul 2023 23:29:33 -0500 Subject: [PATCH] Avoid using GetAllMovies in MediaFileDeletionService --- src/NzbDrone.Core/MediaFiles/MediaFileDeletionService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NzbDrone.Core/MediaFiles/MediaFileDeletionService.cs b/src/NzbDrone.Core/MediaFiles/MediaFileDeletionService.cs index 84b0ce61e..d1710952f 100644 --- a/src/NzbDrone.Core/MediaFiles/MediaFileDeletionService.cs +++ b/src/NzbDrone.Core/MediaFiles/MediaFileDeletionService.cs @@ -92,24 +92,24 @@ namespace NzbDrone.Core.MediaFiles { if (message.DeleteFiles) { - var allMovies = _movieService.GetAllMovies(); + var allMovies = _movieService.AllMoviePaths(); foreach (var movie in message.Movies) { foreach (var s in allMovies) { - if (s.Id == movie.Id) + if (s.Key == movie.Id) { continue; } - if (movie.Path.IsParentPath(s.Path)) + if (movie.Path.IsParentPath(s.Value)) { _logger.Error("Movie path: '{0}' is a parent of another movie, not deleting files.", movie.Path); return; } - if (movie.Path.PathEquals(s.Path)) + if (movie.Path.PathEquals(s.Value)) { _logger.Error("Movie path: '{0}' is the same as another movie, not deleting files.", movie.Path); return;