From 752915ea0a2dbeac9fc0da4e5ef782cbab988fda Mon Sep 17 00:00:00 2001 From: tidusjar Date: Wed, 22 Jun 2016 20:22:38 +0100 Subject: [PATCH] Potential fix for #350 --- PlexRequests.Services/Jobs/CouchPotatoCacher.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PlexRequests.Services/Jobs/CouchPotatoCacher.cs b/PlexRequests.Services/Jobs/CouchPotatoCacher.cs index 3fb831b12..8a9f666b1 100644 --- a/PlexRequests.Services/Jobs/CouchPotatoCacher.cs +++ b/PlexRequests.Services/Jobs/CouchPotatoCacher.cs @@ -87,7 +87,12 @@ namespace PlexRequests.Services.Jobs public int[] QueuedIds() { var movies = Cache.Get(CacheKeys.CouchPotatoQueued); - return movies?.movies?.Select(x => x.info.tmdb_id).ToArray() ?? new int[] { }; + var items = movies?.movies?.Select(x => x.info?.tmdb_id).Cast().ToArray(); + if (items == null) + { + return new int[] { }; + } + return items; } public void Execute(IJobExecutionContext context)