From eb51a42f6019d96d3138428e228463cb6beb0d21 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 19 Mar 2020 10:11:07 -0700 Subject: [PATCH] Fixed: Sorting queue by episode properties when not all items have an episode --- frontend/src/Store/Actions/queueActions.js | 1 + src/Sonarr.Api.V3/Queue/QueueModule.cs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/Store/Actions/queueActions.js b/frontend/src/Store/Actions/queueActions.js index 6334bc058..a73009deb 100644 --- a/frontend/src/Store/Actions/queueActions.js +++ b/frontend/src/Store/Actions/queueActions.js @@ -77,6 +77,7 @@ export const defaultState = { { name: 'episode.title', label: 'Episode Title', + isSortable: true, isVisible: true }, { diff --git a/src/Sonarr.Api.V3/Queue/QueueModule.cs b/src/Sonarr.Api.V3/Queue/QueueModule.cs index f62a2be5b..1919c6d7c 100644 --- a/src/Sonarr.Api.V3/Queue/QueueModule.cs +++ b/src/Sonarr.Api.V3/Queue/QueueModule.cs @@ -151,9 +151,9 @@ namespace Sonarr.Api.V3.Queue case "episode": return q => q.Episode; case "episode.airDateUtc": - return q => q.Episode.AirDateUtc; + return q => q.Episode?.AirDateUtc; case "episode.title": - return q => q.Episode.Title; + return q => q.Episode?.Title; case "language": return q => q.Language; case "quality":