From b8b82189f79a2b2f83a4d31ac6831e6ed0dd0258 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 30 Jan 2019 18:23:11 -0800 Subject: [PATCH] Fixed: Quality Profile group order no longer used when ordering results --- src/NzbDrone.Core/Profiles/Qualities/QualityProfile.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NzbDrone.Core/Profiles/Qualities/QualityProfile.cs b/src/NzbDrone.Core/Profiles/Qualities/QualityProfile.cs index 90e37ec13..083a5ca9c 100644 --- a/src/NzbDrone.Core/Profiles/Qualities/QualityProfile.cs +++ b/src/NzbDrone.Core/Profiles/Qualities/QualityProfile.cs @@ -26,12 +26,12 @@ namespace NzbDrone.Core.Profiles.Qualities return lastAllowed.Items.Last().Quality; } - public QualityIndex GetIndex(Quality quality) + public QualityIndex GetIndex(Quality quality, bool respectGroupOrder = false) { - return GetIndex(quality.Id); + return GetIndex(quality.Id, respectGroupOrder); } - public QualityIndex GetIndex(int id) + public QualityIndex GetIndex(int id, bool respectGroupOrder = false) { for (var i = 0; i < Items.Count; i++) { @@ -56,7 +56,7 @@ namespace NzbDrone.Core.Profiles.Qualities if (groupItem.Quality.Id == id) { - return new QualityIndex(i, g); + return respectGroupOrder ? new QualityIndex(i, g) : new QualityIndex(i); } } }