Some general improvements

This commit is contained in:
tidusjar 2017-01-27 22:39:43 +00:00
commit a1eb944f83
7 changed files with 31 additions and 53 deletions

View file

@ -66,7 +66,15 @@ namespace Ombi.Services.Jobs
var movies = RadarrApi.GetMovies(settings.ApiKey, settings.FullUri);
if (movies != null)
{
var movieIds = movies.Select(x => x.tmdbId).ToList();
var movieIds = new List<int>();
foreach (var m in movies)
{
if (m.tmdbId > 0)
{
movieIds.Add(m.tmdbId);
}
}
//var movieIds = movies.Select(x => x.tmdbId).ToList();
Cache.Set(CacheKeys.RadarrMovies, movieIds, CacheKeys.TimeFrameMinutes.SchedulerCaching);
}
}