mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-13 00:32:57 -07:00
Fixed an issue where we would add the Sickrage series but it would fail on adding the seasons.
This commit is contained in:
parent
5d1b335d6c
commit
f0d44b2788
5 changed files with 18 additions and 22 deletions
|
@ -1,10 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PlexRequests.Api.Models.SickRage
|
||||
namespace PlexRequests.Api.Models.SickRage
|
||||
{
|
||||
public class SickRageBase<T>
|
||||
{
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PlexRequests.Api.Models.SickRage
|
||||
namespace PlexRequests.Api.Models.SickRage
|
||||
{
|
||||
public class SickRageSeasonList : SickRageBase<int[]>
|
||||
{
|
||||
|
|
|
@ -132,10 +132,17 @@ namespace PlexRequests.Api
|
|||
request.AddUrlSegment("apiKey", apiKey);
|
||||
request.AddQueryParameter("tvdbid", tvdbId.ToString());
|
||||
|
||||
try
|
||||
{
|
||||
var obj = Api.ExecuteJson<SickRageSeasonList>(request, baseUrl);
|
||||
|
||||
return obj;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error(e);
|
||||
return new SickRageSeasonList();
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<SickRageTvAdd> AddSeason(int tvdbId, int season, string apiKey, Uri baseUrl)
|
||||
{
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace PlexRequests.Core.SettingModels
|
|||
{
|
||||
return new Dictionary<string, string>() {
|
||||
{ "default", "Use Deafult" },
|
||||
{ "sdtv", ">SD TV" },
|
||||
{ "sdtv", "SD TV" },
|
||||
{ "sddvd", "SD DVD" },
|
||||
{ "hdtv", "HD TV" },
|
||||
{ "rawhdtv", "Raw HD TV" },
|
||||
|
|
|
@ -82,13 +82,14 @@ namespace PlexRequests.UI.Helpers
|
|||
qualityId = sickRageSettings.QualityProfile;
|
||||
}
|
||||
|
||||
var result = SickrageApi.AddSeries(model.ProviderId, model.SeasonCount, model.SeasonList, qualityId,
|
||||
var apiResult = SickrageApi.AddSeries(model.ProviderId, model.SeasonCount, model.SeasonList, qualityId,
|
||||
sickRageSettings.ApiKey, sickRageSettings.FullUri);
|
||||
|
||||
var result = apiResult.Result;
|
||||
Log.Trace("SickRage Add Result: ");
|
||||
Log.Trace(result.DumpJson());
|
||||
|
||||
return result.Result;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue