mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +02:00
Additional logging for partial Plex path scan
This commit is contained in:
parent
43257f0726
commit
f2a7d0d520
@ -57,15 +57,15 @@ public void UpdateLibrary(IEnumerable<Movie> multipleMovies, PlexServerSettings
|
|||||||
var partialUpdates = _partialUpdateCache.Get(settings.Host, () => PartialUpdatesAllowed(settings, version), TimeSpan.FromHours(2));
|
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 pathScanCache = _pathScanCache.Get(settings.Host, () => PathUpdatesAllowed(settings, version), TimeSpan.FromHours(2));
|
||||||
|
|
||||||
var pathUpdated = true;
|
var pathsUpdated = true;
|
||||||
|
|
||||||
if (pathScanCache)
|
if (pathScanCache)
|
||||||
{
|
{
|
||||||
foreach (var movie in multipleMovies)
|
foreach (var movie in multipleMovies)
|
||||||
{
|
{
|
||||||
pathUpdated &= UpdatePath(movie, sections, settings);
|
pathsUpdated &= UpdatePath(movie, sections, settings);
|
||||||
|
|
||||||
if (!pathUpdated)
|
if (!pathsUpdated)
|
||||||
{
|
{
|
||||||
break;
|
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 we couldn't path update then try partial and full update
|
||||||
if (!pathUpdated)
|
if (!pathScanCache || (pathScanCache && !pathsUpdated))
|
||||||
{
|
{
|
||||||
if (partialUpdates)
|
if (partialUpdates)
|
||||||
{
|
{
|
||||||
@ -244,6 +244,10 @@ private bool UpdatePath(Movie movie, List<PlexSection> sections, PlexServerSetti
|
|||||||
|
|
||||||
pathUpdated = true;
|
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;
|
return pathUpdated;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user