diff options
| author | crobibero <cody@robibe.ro> | 2020-11-17 09:38:50 -0700 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-11-17 09:38:50 -0700 |
| commit | 7bf647bb942fb5adfc1d96fc324d549af5f30651 (patch) | |
| tree | 34bb7c0eb3dca4903f2c04b9ac1d2a6966a1ebe5 | |
| parent | 3b68ce1183c89cf79b38895d3401b7005674f79c (diff) | |
Remove precondition checks
| -rw-r--r-- | Jellyfin.Api/Controllers/ItemsController.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Jellyfin.Api/Controllers/ItemsController.cs b/Jellyfin.Api/Controllers/ItemsController.cs index 43282b685..6d30a3d42 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 |
