mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
Ignores Trakt exceptions when retrieving optional tv show information.
This commit is contained in:
parent
e2ba527aaf
commit
fe711b6783
1 changed files with 13 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
@ -47,9 +48,20 @@ namespace Ombi.Api.Trakt
|
||||||
|
|
||||||
|
|
||||||
public async Task<TraktShow> GetTvExtendedInfo(string imdbId)
|
public async Task<TraktShow> GetTvExtendedInfo(string imdbId)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
return await Client.Shows.GetShowAsync(imdbId, TraktExtendedOption.Full);
|
return await Client.Shows.GetShowAsync(imdbId, TraktExtendedOption.Full);
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
// Ignore the exception since the information returned from this API is optional.
|
||||||
|
Console.WriteLine($"Failed to retrieve extended tv information from Trakt. IMDbId: '{imdbId}'.");
|
||||||
|
Console.WriteLine(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue