aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/SearchController.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2023-02-20 11:58:14 +0100
committerShadowghost <Ghost_of_Stone@web.de>2023-02-20 11:58:14 +0100
commitc5a363a007b98e7a680bb2a95d9bd49a7dced8f2 (patch)
treea03167485dba1c034b3a9f8d5ec92661f1322a0c /Jellyfin.Api/Controllers/SearchController.cs
parentaf7acc000c961312bd4a2d061dc74c64c0e3647a (diff)
parent720852f7087e32053407cd849470d3f13f57159c (diff)
Merge branch 'master' into network-rewrite
Diffstat (limited to 'Jellyfin.Api/Controllers/SearchController.cs')
-rw-r--r--Jellyfin.Api/Controllers/SearchController.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/SearchController.cs b/Jellyfin.Api/Controllers/SearchController.cs
index a25b43345..f638c31c3 100644
--- a/Jellyfin.Api/Controllers/SearchController.cs
+++ b/Jellyfin.Api/Controllers/SearchController.cs
@@ -3,6 +3,8 @@ using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Globalization;
using System.Linq;
+using Jellyfin.Api.Constants;
+using Jellyfin.Api.Helpers;
using Jellyfin.Api.ModelBinders;
using Jellyfin.Data.Enums;
using Jellyfin.Extensions;
@@ -98,6 +100,7 @@ public class SearchController : BaseJellyfinApiController
[FromQuery] bool includeStudios = true,
[FromQuery] bool includeArtists = true)
{
+ userId = RequestHelpers.GetUserId(User, userId);
var result = _searchEngine.GetSearchHints(new SearchQuery
{
Limit = limit,
@@ -108,7 +111,7 @@ public class SearchController : BaseJellyfinApiController
IncludePeople = includePeople,
IncludeStudios = includeStudios,
StartIndex = startIndex,
- UserId = userId ?? Guid.Empty,
+ UserId = userId.Value,
IncludeItemTypes = includeItemTypes,
ExcludeItemTypes = excludeItemTypes,
MediaTypes = mediaTypes,