|
|
|
@ -35,6 +35,10 @@ namespace Ombi.Controllers
|
|
|
|
|
[HttpGet("tv/{tvdbid}")]
|
|
|
|
|
public async Task<string> GetTvBanner(int tvdbid)
|
|
|
|
|
{
|
|
|
|
|
if (tvdbid <= 0)
|
|
|
|
|
{
|
|
|
|
|
return string.Empty;
|
|
|
|
|
}
|
|
|
|
|
var key = await _cache.GetOrAdd(CacheKeys.FanartTv, async () => await Config.Get(Store.Entities.ConfigurationTypes.FanartTv), DateTime.Now.AddDays(1));
|
|
|
|
|
|
|
|
|
|
var images = await FanartTvApi.GetTvImages(tvdbid, key.Value);
|
|
|
|
@ -90,6 +94,10 @@ namespace Ombi.Controllers
|
|
|
|
|
[HttpGet("poster/tv/{tvdbid}")]
|
|
|
|
|
public async Task<string> GetTvPoster(int tvdbid)
|
|
|
|
|
{
|
|
|
|
|
if (tvdbid <= 0)
|
|
|
|
|
{
|
|
|
|
|
return string.Empty;
|
|
|
|
|
}
|
|
|
|
|
var key = await _cache.GetOrAdd(CacheKeys.FanartTv, async () => await Config.Get(Store.Entities.ConfigurationTypes.FanartTv), DateTime.Now.AddDays(1));
|
|
|
|
|
|
|
|
|
|
var images = await FanartTvApi.GetTvImages(tvdbid, key.Value);
|
|
|
|
@ -145,6 +153,10 @@ namespace Ombi.Controllers
|
|
|
|
|
[HttpGet("background/tv/{tvdbid}")]
|
|
|
|
|
public async Task<string> GetTvBackground(int tvdbid)
|
|
|
|
|
{
|
|
|
|
|
if (tvdbid <= 0)
|
|
|
|
|
{
|
|
|
|
|
return string.Empty;
|
|
|
|
|
}
|
|
|
|
|
var key = await _cache.GetOrAdd(CacheKeys.FanartTv, async () => await Config.Get(Store.Entities.ConfigurationTypes.FanartTv), DateTime.Now.AddDays(1));
|
|
|
|
|
|
|
|
|
|
var images = await FanartTvApi.GetTvImages(tvdbid, key.Value);
|
|
|
|
|