mirror of
https://github.com/Radarr/Radarr
synced 2025-02-20 13:27:10 +00:00
Additional logging for partial Plex path scan
This commit is contained in:
parent
43257f0726
commit
f2a7d0d520
1 changed files with 8 additions and 4 deletions
|
@ -57,15 +57,15 @@ public void UpdateLibrary(IEnumerable<Movie> 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<Movie> 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<PlexSection> 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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue