Add tag filtering and random sorting to GetSimilarItems (#14918)
This commit is contained in:
@@ -528,7 +528,7 @@ namespace Emby.Server.Implementations.Library
|
|||||||
{
|
{
|
||||||
Genre => _configurationManager.ApplicationPaths.GenrePath,
|
Genre => _configurationManager.ApplicationPaths.GenrePath,
|
||||||
MusicArtist => _configurationManager.ApplicationPaths.ArtistsPath,
|
MusicArtist => _configurationManager.ApplicationPaths.ArtistsPath,
|
||||||
MusicGenre => _configurationManager.ApplicationPaths.GenrePath,
|
MusicGenre => _configurationManager.ApplicationPaths.MusicGenrePath,
|
||||||
Person => _configurationManager.ApplicationPaths.PeoplePath,
|
Person => _configurationManager.ApplicationPaths.PeoplePath,
|
||||||
Studio => _configurationManager.ApplicationPaths.StudioPath,
|
Studio => _configurationManager.ApplicationPaths.StudioPath,
|
||||||
Year => _configurationManager.ApplicationPaths.YearPath,
|
Year => _configurationManager.ApplicationPaths.YearPath,
|
||||||
|
|||||||
@@ -779,12 +779,14 @@ public class LibraryController : BaseJellyfinApiController
|
|||||||
var query = new InternalItemsQuery(user)
|
var query = new InternalItemsQuery(user)
|
||||||
{
|
{
|
||||||
Genres = item.Genres,
|
Genres = item.Genres,
|
||||||
|
Tags = item.Tags,
|
||||||
Limit = limit,
|
Limit = limit,
|
||||||
IncludeItemTypes = includeItemTypes.ToArray(),
|
IncludeItemTypes = includeItemTypes.ToArray(),
|
||||||
DtoOptions = dtoOptions,
|
DtoOptions = dtoOptions,
|
||||||
EnableTotalRecordCount = !isMovie ?? true,
|
EnableTotalRecordCount = !isMovie ?? true,
|
||||||
EnableGroupByMetadataKey = isMovie ?? false,
|
EnableGroupByMetadataKey = isMovie ?? false,
|
||||||
ExcludeItemIds = [itemId]
|
ExcludeItemIds = [itemId],
|
||||||
|
OrderBy = [(ItemSortBy.Random, SortOrder.Ascending)]
|
||||||
};
|
};
|
||||||
|
|
||||||
// ExcludeArtistIds
|
// ExcludeArtistIds
|
||||||
|
|||||||
Reference in New Issue
Block a user