mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
fix null exception possibility in cp/sickrage cacher classes
This commit is contained in:
parent
25714f03f7
commit
a679f1a6a1
2 changed files with 2 additions and 2 deletions
|
@ -87,7 +87,7 @@ namespace PlexRequests.Services.Jobs
|
||||||
public int[] QueuedIds()
|
public int[] QueuedIds()
|
||||||
{
|
{
|
||||||
var movies = Cache.Get<CouchPotatoMovies>(CacheKeys.CouchPotatoQueued);
|
var movies = Cache.Get<CouchPotatoMovies>(CacheKeys.CouchPotatoQueued);
|
||||||
return movies?.movies.Select(x => x.info.tmdb_id).ToArray() ?? new int[] { };
|
return movies?.movies?.Select(x => x.info.tmdb_id).ToArray() ?? new int[] { };
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Execute(IJobExecutionContext context)
|
public void Execute(IJobExecutionContext context)
|
||||||
|
|
|
@ -87,7 +87,7 @@ namespace PlexRequests.Services.Jobs
|
||||||
public int[] QueuedIds()
|
public int[] QueuedIds()
|
||||||
{
|
{
|
||||||
var tv = Cache.Get<SickrageShows>(CacheKeys.SickRageQueued);
|
var tv = Cache.Get<SickrageShows>(CacheKeys.SickRageQueued);
|
||||||
return tv?.data.Values.Select(x => x.tvdbid).ToArray() ?? new int[] { };
|
return tv?.data?.Values.Select(x => x.tvdbid).ToArray() ?? new int[] { };
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Execute(IJobExecutionContext context)
|
public void Execute(IJobExecutionContext context)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue