mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -07:00
#254 having an issue with Sonarr
This commit is contained in:
parent
cd135d824c
commit
5411225fa0
10 changed files with 66 additions and 782 deletions
|
@ -64,7 +64,7 @@ namespace PlexRequests.Api
|
|||
return obj;
|
||||
}
|
||||
|
||||
public SonarrAddSeries AddSeries(int tvdbId, string title, int qualityId, bool seasonFolders, string rootPath, int seasonCount, int[] seasons, string apiKey, Uri baseUrl)
|
||||
public SonarrAddSeries AddSeries(int tvdbId, string title, int qualityId, bool seasonFolders, string rootPath, int seasonCount, int[] seasons, string apiKey, Uri baseUrl, bool monitor = true)
|
||||
{
|
||||
Log.Debug("Adding series {0}", title);
|
||||
Log.Debug("Seasons = {0}, out of {1} seasons", seasons.DumpJson(), seasonCount);
|
||||
|
@ -82,7 +82,7 @@ namespace PlexRequests.Api
|
|||
tvdbId = tvdbId,
|
||||
titleSlug = title,
|
||||
seasons = new List<Season>(),
|
||||
rootFolderPath = rootPath
|
||||
rootFolderPath = rootPath,
|
||||
};
|
||||
|
||||
for (var i = 1; i <= seasonCount; i++)
|
||||
|
@ -95,12 +95,17 @@ namespace PlexRequests.Api
|
|||
options.seasons.Add(season);
|
||||
}
|
||||
|
||||
if (!monitor)
|
||||
{
|
||||
options.monitored = false;
|
||||
}
|
||||
|
||||
Log.Debug("Sonarr API Options:");
|
||||
Log.Debug(options.DumpJson());
|
||||
|
||||
request.AddHeader("X-Api-Key", apiKey);
|
||||
request.AddJsonBody(options);
|
||||
|
||||
|
||||
SonarrAddSeries result;
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue