mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 13:53:19 -07:00
Merge pull request #342 from tidusjar/dev
fix logic for obtaining a sonarr quality profile #340
This commit is contained in:
commit
52ad5f24ad
2 changed files with 101 additions and 99 deletions
|
@ -225,7 +225,8 @@ namespace PlexRequests.Services.Jobs
|
|||
{
|
||||
if (advanced)
|
||||
{
|
||||
if (show.ProviderId.Equals(providerId, StringComparison.InvariantCultureIgnoreCase))
|
||||
if (!string.IsNullOrEmpty(show.ProviderId) &&
|
||||
show.ProviderId.Equals(providerId, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -53,16 +53,17 @@ namespace PlexRequests.UI.Helpers
|
|||
|
||||
public SonarrAddSeries SendToSonarr(SonarrSettings sonarrSettings, RequestedModel model, string qualityId)
|
||||
{
|
||||
|
||||
var qualityProfile = 0;
|
||||
|
||||
if (!string.IsNullOrEmpty(qualityId)) // try to parse the passed in quality, otherwise use the settings default quality
|
||||
{
|
||||
if (!int.TryParse(qualityId, out qualityProfile))
|
||||
int.TryParse(qualityId, out qualityProfile);
|
||||
}
|
||||
|
||||
if (qualityProfile <= 0)
|
||||
{
|
||||
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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue