Fixed #303 Looks like there was some incorrect business logic.

pull/332/head
tidusjar 9 years ago
parent 66bede34f4
commit 709203935a

@ -53,11 +53,15 @@ 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,

Loading…
Cancel
Save