mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-24 22:35:39 -04:00
Fixed: Cutoff Specification not Respecting Profile Order (#660)
* Fixed: Cutoff Specification not Repsecting Profile Order * Fixed: Incorrect wording in UpgradeAllowed logging * Fixed: Change Logic to update if upgrade for any, downgrade for none. * Fixed: Removed Double Preferred Word Logic * New: Add Test Cases to Disk Upgrade Spec * Fixed: Cleanup UpgradableSpecification * Add ConcatToString extension and fix logging * Fixed: Enum Naming, Commas
This commit is contained in:
@@ -7,6 +7,7 @@ using NzbDrone.Core.MediaFiles;
|
||||
using NzbDrone.Core.Music;
|
||||
using NzbDrone.Common.Cache;
|
||||
using NzbDrone.Core.Profiles.Releases;
|
||||
using NzbDrone.Common.Extensions;
|
||||
|
||||
namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
{
|
||||
@@ -48,18 +49,19 @@ namespace NzbDrone.Core.DecisionEngine.Specifications
|
||||
|
||||
if (!tracksMissing && trackFiles.Any())
|
||||
{
|
||||
var lowestQuality = trackFiles.Select(c => c.Quality).OrderBy(c => c.Quality.Id).First();
|
||||
var currentQualities = trackFiles.Select(c => c.Quality).Distinct().ToList();
|
||||
var currentLanguages = trackFiles.Select(c => c.Language).Distinct().ToList();
|
||||
|
||||
if (!_upgradableSpecification.IsUpgradable(subject.Artist.QualityProfile,
|
||||
subject.Artist.LanguageProfile,
|
||||
lowestQuality,
|
||||
trackFiles[0].Language,
|
||||
currentQualities,
|
||||
currentLanguages,
|
||||
_preferredWordServiceCalculator.Calculate(subject.Artist, trackFiles[0].GetSceneOrFileName()),
|
||||
subject.ParsedAlbumInfo.Quality,
|
||||
subject.ParsedAlbumInfo.Language,
|
||||
subject.PreferredWordScore))
|
||||
{
|
||||
return Decision.Reject("Existing file on disk is of equal or higher preference: {0} - {1}", lowestQuality, trackFiles[0].Language);
|
||||
return Decision.Reject("Existing files on disk is of equal or higher preference: {0} - {1}", currentQualities.ConcatToString(), currentLanguages.ConcatToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user