mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 07:46:05 -07:00
Fixes issue #62
This commit is contained in:
parent
b100fbe678
commit
c9d2b8fc13
10 changed files with 73 additions and 17 deletions
|
@ -54,7 +54,7 @@ namespace PlexRequests.Api
|
|||
return obj;
|
||||
}
|
||||
|
||||
public SonarrAddSeries AddSeries(int tvdbId, string title, int qualityId, bool seasonFolders, string rootPath, bool episodes, string apiKey, Uri baseUrl)
|
||||
public SonarrAddSeries AddSeries(int tvdbId, string title, int qualityId, bool seasonFolders, string rootPath, bool episodes, int[] seasons, string apiKey, Uri baseUrl)
|
||||
{
|
||||
|
||||
var request = new RestRequest
|
||||
|
@ -90,6 +90,19 @@ namespace PlexRequests.Api
|
|||
options.seasons = new List<Season>();
|
||||
options.rootFolderPath = rootPath;
|
||||
|
||||
if (seasons.Length > 0)
|
||||
{
|
||||
foreach (int s in seasons)
|
||||
{
|
||||
var season = new Season
|
||||
{
|
||||
seasonNumber = s,
|
||||
monitored = true
|
||||
};
|
||||
options.seasons.Add(season);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
request.AddHeader("X-Api-Key", apiKey);
|
||||
request.AddJsonBody(options);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue