|
|
|
@ -75,6 +75,13 @@ namespace PlexRequests.Services.Jobs
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var libraries = CachedLibraries(authSettings, plexSettings, true); //force setting the cache (10 min intervals via scheduler)
|
|
|
|
|
|
|
|
|
|
if (libraries == null || !libraries.Any())
|
|
|
|
|
{
|
|
|
|
|
Log.Info("Did not find any libraries in Plex.");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var movies = GetPlexMovies().ToArray();
|
|
|
|
|
var shows = GetPlexTvShows().ToArray();
|
|
|
|
|
var albums = GetPlexAlbums().ToArray();
|
|
|
|
@ -248,6 +255,8 @@ namespace PlexRequests.Services.Jobs
|
|
|
|
|
return results; // don't error out here, just let it go!
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (setCache)
|
|
|
|
|
{
|
|
|
|
|
Log.Trace("Plex Lib API Call");
|
|
|
|
@ -267,6 +276,12 @@ namespace PlexRequests.Services.Jobs
|
|
|
|
|
return GetLibraries(authSettings, plexSettings);
|
|
|
|
|
}, CacheKeys.TimeFrameMinutes.SchedulerCaching);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
Log.Error(ex, "Failed to obtain Plex libraries");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return results;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|