diff --git a/src/Ombi.Core/Senders/TvSender.cs b/src/Ombi.Core/Senders/TvSender.cs index c5771eb9f..549467feb 100644 --- a/src/Ombi.Core/Senders/TvSender.cs +++ b/src/Ombi.Core/Senders/TvSender.cs @@ -118,17 +118,31 @@ namespace Ombi.Core.Senders return null; } - int.TryParse(s.QualityProfile, out var qualityToUse); + int qualityToUse; + string rootFolderPath; + + if (model.SeriesType == SeriesType.Anime) + { + // Get the root path from the rootfolder selected. + // For some reason, if we haven't got one use the first root folder in Sonarr + // TODO make this overrideable via the UI + rootFolderPath = await GetSonarrRootPath(model.ParentRequest.RootFolder ?? int.Parse(s.RootPathAnime), s); + int.TryParse(s.QualityProfileAnime, out qualityToUse); + } + else + { + int.TryParse(s.QualityProfile, out qualityToUse); + } if (model.ParentRequest.QualityOverride.HasValue) { + // Get the root path from the rootfolder selected. + // For some reason, if we haven't got one use the first root folder in Sonarr + // TODO make this overrideable via the UI + rootFolderPath = await GetSonarrRootPath(model.ParentRequest.RootFolder ?? int.Parse(s.RootPath), s); qualityToUse = model.ParentRequest.QualityOverride.Value; } - - // Get the root path from the rootfolder selected. - // For some reason, if we haven't got one use the first root folder in Sonarr - // TODO make this overrideable via the UI - var rootFolderPath = await GetSonarrRootPath(model.ParentRequest.RootFolder ?? int.Parse(s.RootPath), s); + try { // Does the series actually exist? diff --git a/src/Ombi.Settings/Settings/Models/External/SonarrSettings.cs b/src/Ombi.Settings/Settings/Models/External/SonarrSettings.cs index 789b8f384..0c7e17900 100644 --- a/src/Ombi.Settings/Settings/Models/External/SonarrSettings.cs +++ b/src/Ombi.Settings/Settings/Models/External/SonarrSettings.cs @@ -13,6 +13,10 @@ /// The root path. /// public string RootPath { get; set; } + + + public string QualityProfileAnime { get; set; } + public string RootPathAnime { get; set; } public bool AddOnly { get; set; } } } \ No newline at end of file diff --git a/src/Ombi/ClientApp/app/interfaces/ISettings.ts b/src/Ombi/ClientApp/app/interfaces/ISettings.ts index 8e7fdbe1c..dc1825c83 100644 --- a/src/Ombi/ClientApp/app/interfaces/ISettings.ts +++ b/src/Ombi/ClientApp/app/interfaces/ISettings.ts @@ -65,8 +65,10 @@ export interface ISonarrSettings extends IExternalSettings { apiKey: string; enabled: boolean; qualityProfile: string; + qualityProfileAnime: string; seasonFolders: boolean; rootPath: string; + rootPathAnime: string; fullRootPath: string; addOnly: boolean; } diff --git a/src/Ombi/ClientApp/app/settings/sonarr/sonarr.component.html b/src/Ombi/ClientApp/app/settings/sonarr/sonarr.component.html index e041ab0d0..6a419feab 100644 --- a/src/Ombi/ClientApp/app/settings/sonarr/sonarr.component.html +++ b/src/Ombi/ClientApp/app/settings/sonarr/sonarr.component.html @@ -68,6 +68,14 @@ A Default Quality Profile is required +