From af55e322f1a9505a0b63739b499d6af72c3105a0 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 26 May 2023 23:19:42 +0300 Subject: [PATCH] Fixed: Sorting search releases by language --- frontend/src/Store/Actions/releaseActions.js | 2 +- src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/Store/Actions/releaseActions.js b/frontend/src/Store/Actions/releaseActions.js index 27c386b76..7163f93c6 100644 --- a/frontend/src/Store/Actions/releaseActions.js +++ b/frontend/src/Store/Actions/releaseActions.js @@ -44,7 +44,7 @@ export const defaultState = { return 10000; } - return item.languages[0].id; + return item.languages[0]?.id ?? 0; }, rejections: function(item, direction) { diff --git a/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs b/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs index cdc4e7474..c38cbb822 100644 --- a/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs +++ b/src/NzbDrone.Core/DecisionEngine/DownloadDecisionMaker.cs @@ -138,6 +138,7 @@ namespace NzbDrone.Core.DecisionEngine { Release = report, ParsedEpisodeInfo = parsedEpisodeInfo, + Languages = parsedEpisodeInfo.Languages }; decision = new DownloadDecision(remoteEpisode, new Rejection("Unable to parse release"));