mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
added some error handing around the GetMovie area #517
This commit is contained in:
parent
16d55c95ed
commit
465b24e6b0
1 changed files with 9 additions and 0 deletions
|
@ -195,9 +195,18 @@ namespace PlexRequests.Services.Jobs
|
|||
|
||||
public PlexMovie GetMovie(PlexMovie[] plexMovies, string title, string year, string providerId = null)
|
||||
{
|
||||
if (plexMovies.Length == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
var advanced = !string.IsNullOrEmpty(providerId);
|
||||
foreach (var movie in plexMovies)
|
||||
{
|
||||
if (string.IsNullOrEmpty(movie.Title) || string.IsNullOrEmpty(movie.ReleaseYear))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (advanced)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(movie.ProviderId) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue