Skip to content

Commit

Permalink
Potential fix for #350
Browse files Browse the repository at this point in the history
  • Loading branch information
tidusjar committed Jun 22, 2016
1 parent 818c2e8 commit 752915e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion PlexRequests.Services/Jobs/CouchPotatoCacher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,12 @@ public void Queued()
public int[] QueuedIds()
{
var movies = Cache.Get<CouchPotatoMovies>(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<int>().ToArray();
if (items == null)
{
return new int[] { };
}
return items;
}

public void Execute(IJobExecutionContext context)
Expand Down

0 comments on commit 752915e

Please sign in to comment.