From 7bf647bb942fb5adfc1d96fc324d549af5f30651 Mon Sep 17 00:00:00 2001 From: crobibero Date: Tue, 17 Nov 2020 09:38:50 -0700 Subject: [PATCH] Remove precondition checks --- Jellyfin.Api/Controllers/ItemsController.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Jellyfin.Api/Controllers/ItemsController.cs b/Jellyfin.Api/Controllers/ItemsController.cs index 43282b6851..6d30a3d425 100644 --- a/Jellyfin.Api/Controllers/ItemsController.cs +++ b/Jellyfin.Api/Controllers/ItemsController.cs @@ -412,13 +412,9 @@ namespace Jellyfin.Api.Controllers query.IsVirtualItem = false; } - if (locationTypes.Length != 0) + if (locationTypes.Length > 0 && locationTypes.Length < 4) { - var requestedLocationTypes = locationTypes; - if (requestedLocationTypes.Length > 0 && requestedLocationTypes.Length < 4) - { - query.IsVirtualItem = requestedLocationTypes.Contains(LocationType.Virtual); - } + query.IsVirtualItem = locationTypes.Contains(LocationType.Virtual); } // Min official rating