mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 13:23:20 -07:00
Merge branch 'dev' of https://github.com/tidusjar/PlexRequests.Net.git
This commit is contained in:
commit
679236c381
1 changed files with 9 additions and 5 deletions
|
@ -53,13 +53,17 @@ namespace PlexRequests.UI.Helpers
|
|||
|
||||
public SonarrAddSeries SendToSonarr(SonarrSettings sonarrSettings, RequestedModel model, string qualityId)
|
||||
{
|
||||
int qualityProfile;
|
||||
|
||||
if (!string.IsNullOrEmpty(qualityId) || !int.TryParse(qualityId, out qualityProfile)) // try to parse the passed in quality, otherwise use the settings default quality
|
||||
|
||||
var qualityProfile = 0;
|
||||
|
||||
if (!string.IsNullOrEmpty(qualityId)) // try to parse the passed in quality, otherwise use the settings default quality
|
||||
{
|
||||
int.TryParse(sonarrSettings.QualityProfile, out qualityProfile);
|
||||
if (!int.TryParse(qualityId, out qualityProfile))
|
||||
{
|
||||
int.TryParse(sonarrSettings.QualityProfile, out qualityProfile);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var result = SonarrApi.AddSeries(model.ProviderId, model.Title, qualityProfile,
|
||||
sonarrSettings.SeasonFolders, sonarrSettings.RootPath, model.SeasonCount, model.SeasonList, sonarrSettings.ApiKey,
|
||||
sonarrSettings.FullUri);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue