mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 10:36:54 -07:00
Fixed #303 Looks like there was some incorrect business logic.
This commit is contained in:
parent
66bede34f4
commit
709203935a
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