Check for empty guid

This commit is contained in:
Niels van Velzen 2022-08-14 12:58:38 +02:00
parent 0f91244239
commit 61afd029df
3 changed files with 4 additions and 4 deletions

View File

@ -278,7 +278,7 @@ namespace Jellyfin.Api.Controllers
}
// This must be the last filter
if (adjacentTo.HasValue)
if (adjacentTo.HasValue && !adjacentTo.Value.Equals(default))
{
episodes = UserViewBuilder.FilterForAdjacency(episodes, adjacentTo.Value).ToList();
}

View File

@ -860,7 +860,7 @@ namespace MediaBrowser.Controller.Entities
return true;
}
if (query.AdjacentTo.HasValue)
if (query.AdjacentTo.HasValue && !query.AdjacentTo.Value.Equals(default))
{
Logger.LogDebug("Query requires post-filtering due to AdjacentTo");
return true;
@ -1029,7 +1029,7 @@ namespace MediaBrowser.Controller.Entities
#pragma warning restore CA1309
// This must be the last filter
if (query.AdjacentTo.HasValue)
if (query.AdjacentTo.HasValue && !query.AdjacentTo.Value.Equals(default))
{
items = UserViewBuilder.FilterForAdjacency(items.ToList(), query.AdjacentTo.Value);
}

View File

@ -433,7 +433,7 @@ namespace MediaBrowser.Controller.Entities
var user = query.User;
// This must be the last filter
if (query.AdjacentTo.HasValue)
if (query.AdjacentTo.HasValue && !query.AdjacentTo.Value.Equals(default))
{
items = FilterForAdjacency(items.ToList(), query.AdjacentTo.Value);
}