Skip to content

The Free Software Media System - Server Backend & API

Fix GetSimilarItems to exclude the searched for item Id (#14686)

evan3141591eadb07a128e
diff --git a/Jellyfin.Api/Controllers/LibraryController.cs b/Jellyfin.Api/Controllers/LibraryController.cs
index bde1758e99..b18d7e05d4 100644
--- a/Jellyfin.Api/Controllers/LibraryController.cs
+++ b/Jellyfin.Api/Controllers/LibraryController.cs
@@ -784,6 +784,7 @@ public class LibraryController : BaseJellyfinApiController
DtoOptions = dtoOptions,
EnableTotalRecordCount = !isMovie ?? true,
EnableGroupByMetadataKey = isMovie ?? false,
+ ExcludeItemIds = [itemId]
};
// ExcludeArtistIds