From ed631142c4d3ad391e0688a56d1e20859f85d20d Mon Sep 17 00:00:00 2001 From: Leonardo Galli Date: Sun, 26 Aug 2018 19:08:55 +0200 Subject: [PATCH] Fixed: Unnecessary housekeeping commands consuming a lot of memory. Fixes #2962 --- .../.idea.NzbDrone/.idea/contentModel.xml | 33 ++++++++++--------- .../FixWronglyMatchedMovieFiles.cs | 6 ++-- .../Housekeepers/UpdateCleanTitleForMovies.cs | 4 +-- 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/.idea/.idea.NzbDrone/.idea/contentModel.xml b/src/.idea/.idea.NzbDrone/.idea/contentModel.xml index 5f78a1506..7bb9c32d7 100644 --- a/src/.idea/.idea.NzbDrone/.idea/contentModel.xml +++ b/src/.idea/.idea.NzbDrone/.idea/contentModel.xml @@ -1,21 +1,24 @@ - + - - - + + + - - - - + + + + + + + - + @@ -67,10 +70,10 @@ - - - - + + + + @@ -3325,7 +3328,7 @@ - + @@ -3337,7 +3340,7 @@ - + diff --git a/src/NzbDrone.Core/Housekeeping/Housekeepers/FixWronglyMatchedMovieFiles.cs b/src/NzbDrone.Core/Housekeeping/Housekeepers/FixWronglyMatchedMovieFiles.cs index 33070ce12..f6756cce4 100644 --- a/src/NzbDrone.Core/Housekeeping/Housekeepers/FixWronglyMatchedMovieFiles.cs +++ b/src/NzbDrone.Core/Housekeeping/Housekeepers/FixWronglyMatchedMovieFiles.cs @@ -13,13 +13,13 @@ public FixWronglyMatchedMovieFiles(IMainDatabase database) public void Clean() { - var mapper = _database.GetDataMapper(); + /*var mapper = _database.GetDataMapper(); mapper.ExecuteNonQuery(@"UPDATE Movies SET MovieFileId = (Select Id FROM MovieFiles WHERE Movies.Id == MovieFiles.MovieId) WHERE MovieFileId != - (SELECT Id FROM MovieFiles WHERE Movies.Id == MovieFiles.MovieId)"); + (SELECT Id FROM MovieFiles WHERE Movies.Id == MovieFiles.MovieId)");*/ } } -} \ No newline at end of file +} diff --git a/src/NzbDrone.Core/Housekeeping/Housekeepers/UpdateCleanTitleForMovies.cs b/src/NzbDrone.Core/Housekeeping/Housekeepers/UpdateCleanTitleForMovies.cs index d94850d01..2d0fb549e 100644 --- a/src/NzbDrone.Core/Housekeeping/Housekeepers/UpdateCleanTitleForMovies.cs +++ b/src/NzbDrone.Core/Housekeeping/Housekeepers/UpdateCleanTitleForMovies.cs @@ -15,13 +15,13 @@ public UpdateCleanTitleForMovies(IMovieRepository movieRepository) public void Clean() { - var movies = _movieRepository.All().ToList(); + /*var movies = _movieRepository.All().ToList(); movies.ForEach(m => { m.CleanTitle = m.CleanTitle.CleanSeriesTitle(); _movieRepository.Update(m); - }); + });*/ } } }