From f2a7d0d520c5d26e5f2466a03380229d220aba58 Mon Sep 17 00:00:00 2001 From: Qstick Date: Sat, 18 Jun 2022 16:33:49 -0500 Subject: [PATCH] Additional logging for partial Plex path scan --- .../Notifications/Plex/Server/PlexServerService.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/NzbDrone.Core/Notifications/Plex/Server/PlexServerService.cs b/src/NzbDrone.Core/Notifications/Plex/Server/PlexServerService.cs index 581ac082f..74fef11dc 100644 --- a/src/NzbDrone.Core/Notifications/Plex/Server/PlexServerService.cs +++ b/src/NzbDrone.Core/Notifications/Plex/Server/PlexServerService.cs @@ -57,15 +57,15 @@ public void UpdateLibrary(IEnumerable multipleMovies, PlexServerSettings var partialUpdates = _partialUpdateCache.Get(settings.Host, () => PartialUpdatesAllowed(settings, version), TimeSpan.FromHours(2)); var pathScanCache = _pathScanCache.Get(settings.Host, () => PathUpdatesAllowed(settings, version), TimeSpan.FromHours(2)); - var pathUpdated = true; + var pathsUpdated = true; if (pathScanCache) { foreach (var movie in multipleMovies) { - pathUpdated &= UpdatePath(movie, sections, settings); + pathsUpdated &= UpdatePath(movie, sections, settings); - if (!pathUpdated) + if (!pathsUpdated) { break; } @@ -73,7 +73,7 @@ public void UpdateLibrary(IEnumerable multipleMovies, PlexServerSettings } // If we couldn't path update then try partial and full update - if (!pathUpdated) + if (!pathScanCache || (pathScanCache && !pathsUpdated)) { if (partialUpdates) { @@ -244,6 +244,10 @@ private bool UpdatePath(Movie movie, List sections, PlexServerSetti pathUpdated = true; } + else + { + _logger.Debug("Unable to update path, mapped movie path {0} is not a child of any plex libraries: {1}", mappedPath, sections.SelectMany(s => s.Locations.Select(l => l.Path)).Join(", ")); + } return pathUpdated; }