mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-13 08:42: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;
|
namespace PlexRequests.Api.Models.SickRage
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace PlexRequests.Api.Models.SickRage
|
|
||||||
{
|
{
|
||||||
public class SickRageBase<T>
|
public class SickRageBase<T>
|
||||||
{
|
{
|
||||||
|
@ -12,4 +6,4 @@ namespace PlexRequests.Api.Models.SickRage
|
||||||
public string message { get; set; }
|
public string message { get; set; }
|
||||||
public string result { get; set; }
|
public string result { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,12 +1,6 @@
|
||||||
using System;
|
namespace PlexRequests.Api.Models.SickRage
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace PlexRequests.Api.Models.SickRage
|
|
||||||
{
|
{
|
||||||
public class SickRageSeasonList : SickRageBase<int[]>
|
public class SickRageSeasonList : SickRageBase<int[]>
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -132,9 +132,16 @@ namespace PlexRequests.Api
|
||||||
request.AddUrlSegment("apiKey", apiKey);
|
request.AddUrlSegment("apiKey", apiKey);
|
||||||
request.AddQueryParameter("tvdbid", tvdbId.ToString());
|
request.AddQueryParameter("tvdbid", tvdbId.ToString());
|
||||||
|
|
||||||
var obj = Api.ExecuteJson<SickRageSeasonList>(request, baseUrl);
|
try
|
||||||
|
{
|
||||||
return obj;
|
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)
|
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>() {
|
return new Dictionary<string, string>() {
|
||||||
{ "default", "Use Deafult" },
|
{ "default", "Use Deafult" },
|
||||||
{ "sdtv", ">SD TV" },
|
{ "sdtv", "SD TV" },
|
||||||
{ "sddvd", "SD DVD" },
|
{ "sddvd", "SD DVD" },
|
||||||
{ "hdtv", "HD TV" },
|
{ "hdtv", "HD TV" },
|
||||||
{ "rawhdtv", "Raw HD TV" },
|
{ "rawhdtv", "Raw HD TV" },
|
||||||
|
|
|
@ -82,13 +82,14 @@ namespace PlexRequests.UI.Helpers
|
||||||
qualityId = sickRageSettings.QualityProfile;
|
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);
|
sickRageSettings.ApiKey, sickRageSettings.FullUri);
|
||||||
|
|
||||||
|
var result = apiResult.Result;
|
||||||
Log.Trace("SickRage Add Result: ");
|
Log.Trace("SickRage Add Result: ");
|
||||||
Log.Trace(result.DumpJson());
|
Log.Trace(result.DumpJson());
|
||||||
|
|
||||||
return result.Result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue