public bool GetUpdates(bool showErrorMsgBox, CancellationToken cts, IEnumerable <SeriesSpecifier> ss) { Say("Validating TMDB cache"); MarkPlaceHoldersDirty(ss); try { Say($"Updates list from TMDB since {latestMovieUpdateTime.LastSuccessfulServerUpdateDateTime()}"); long updateFromEpochTime = latestMovieUpdateTime.LastSuccessfulServerUpdateTimecode(); if (updateFromEpochTime == 0) { MarkAllDirty(); latestMovieUpdateTime.RegisterServerUpdate(DateTime.Now.ToUnixTime()); return(true); } List <int> updates = Client.GetChangesMovies(cts, latestMovieUpdateTime).Select(item => item.Id).Distinct().ToList(); Say($"Processing {updates.Count} updates from TMDB. From between {latestMovieUpdateTime.LastSuccessfulServerUpdateDateTime()} and {latestMovieUpdateTime.ProposedServerUpdateDateTime()}"); foreach (int id in updates) { if (!cts.IsCancellationRequested) { if (HasMovie(id)) { CachedMovieInfo?x = GetMovie(id); if (!(x is null)) { LOGGER.Info( $"Identified that show with TMDB Id {id} {x.Name} should be updated."); x.Dirty = true; } } } else { return(true); } } lock (MOVIE_LOCK) { Say($"Identified {Movies.Values.Count(info => info.Dirty && !info.IsSearchResultOnly)} TMDB Movies need updating"); LOGGER.Info(Movies.Values.Where(info => info.Dirty && !info.IsSearchResultOnly).Select(info => info.Name).ToCsv); } return(true); } catch (SourceConnectivityException conex) { LastErrorMessage = conex.Message; return(false); } catch (SourceConsistencyException sce) { LOGGER.Error(sce.Message); LastErrorMessage = sce.Message; return(false); } finally { SayNothing(); } }