Use original name for MusicAritist matching (#15689)

This commit is contained in:
gnattu
2025-12-06 10:30:02 +08:00
committed by GitHub
parent 636908fc4d
commit 4c5a3fbff3
3 changed files with 12 additions and 2 deletions

View File

@@ -1058,6 +1058,7 @@ namespace Emby.Server.Implementations.Library
{
IncludeItemTypes = [BaseItemKind.MusicArtist],
Name = name,
UseRawName = true,
DtoOptions = options
}).Cast<MusicArtist>()
.OrderBy(i => i.IsAccessedByName ? 1 : 0)

View File

@@ -1929,10 +1929,17 @@ public sealed class BaseItemRepository
}
if (!string.IsNullOrWhiteSpace(filter.Name))
{
if (filter.UseRawName == true)
{
baseQuery = baseQuery.Where(e => e.Name == filter.Name);
}
else
{
var cleanName = GetCleanValue(filter.Name);
baseQuery = baseQuery.Where(e => e.CleanName == cleanName);
}
}
// These are the same, for now
var nameContains = filter.NameContains;

View File

@@ -125,6 +125,8 @@ namespace MediaBrowser.Controller.Entities
public string? Name { get; set; }
public bool? UseRawName { get; set; }
public string? Person { get; set; }
public Guid[] PersonIds { get; set; }