From 085b07a9c6939e020799e1cdcbb71609c3b95c88 Mon Sep 17 00:00:00 2001 From: ta264 Date: Fri, 2 Oct 2020 01:57:38 +0100 Subject: [PATCH] Always scan after manual refresh --- .../Music/Services/RefreshArtistService.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core/Music/Services/RefreshArtistService.cs b/src/NzbDrone.Core/Music/Services/RefreshArtistService.cs index 2ccfafef1..b2aee5efc 100644 --- a/src/NzbDrone.Core/Music/Services/RefreshArtistService.cs +++ b/src/NzbDrone.Core/Music/Services/RefreshArtistService.cs @@ -269,6 +269,7 @@ namespace NzbDrone.Core.Music { var rescanAfterRefresh = _configService.RescanAfterRefresh; var shouldRescan = true; + var filter = FilterFilesType.Matched; var folders = _rootFolderService.All().Select(x => x.Path).ToList(); if (isNew) @@ -290,17 +291,22 @@ namespace NzbDrone.Core.Music _logger.Trace("Skipping rescan. Reason: not after automatic refreshes"); shouldRescan = false; } - else if (!infoUpdated) + else if (!infoUpdated && trigger != CommandTrigger.Manual) { - _logger.Trace("Skipping rescan. Reason: no metadata updated"); + _logger.Trace("Skipping rescan. Reason: no metadata updated after automatic refresh"); shouldRescan = false; } + else if (!infoUpdated) + { + _logger.Trace("No metadata updated, only scanning new files"); + filter = FilterFilesType.Known; + } if (shouldRescan) { // some metadata has updated so rescan unmatched // (but don't add new artists to reduce repeated searches against api) - _commandQueueManager.Push(new RescanFoldersCommand(folders, FilterFilesType.Matched, false, artists.Select(x => x.Id).ToList())); + _commandQueueManager.Push(new RescanFoldersCommand(folders, filter, false, artists.Select(x => x.Id).ToList())); } }