mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 10:04:44 +01:00
update polymer
This commit is contained in:
@@ -104,7 +104,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
container.Adapter = _containerAdapter;
|
||||
|
||||
Plugins.Add(new SwaggerFeature());
|
||||
Plugins.Add(new CorsFeature(allowedHeaders: "Content-Type, Authorization, Range, X-MediaBrowser-Token"));
|
||||
Plugins.Add(new CorsFeature(allowedHeaders: "Content-Type, Authorization, Range, X-MediaBrowser-Token, X-Emby-Authorization"));
|
||||
|
||||
//Plugins.Add(new AuthFeature(() => new AuthUserSession(), new IAuthProvider[] {
|
||||
// new SessionAuthProvider(_containerAdapter.Resolve<ISessionContext>()),
|
||||
|
||||
@@ -256,10 +256,15 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
|
||||
if (query.IncludePeople)
|
||||
{
|
||||
var itemIds = items.Select(i => i.Id).ToList();
|
||||
|
||||
// Find persons
|
||||
var persons = items.SelectMany(i => _libraryManager.GetPeople(i))
|
||||
var persons = _libraryManager.GetPeople(new InternalPeopleQuery
|
||||
{
|
||||
NameContains = searchTerm
|
||||
})
|
||||
.Where(i => itemIds.Contains(i.ItemId))
|
||||
.Select(i => i.Name)
|
||||
.Where(i => !string.IsNullOrWhiteSpace(i))
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.ToList();
|
||||
|
||||
|
||||
@@ -1257,6 +1257,11 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
whereClauses.Add("ListOrder<=@MaxListOrder");
|
||||
cmd.Parameters.Add(cmd, "@MaxListOrder", DbType.Int32).Value = query.MaxListOrder.Value;
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(query.NameContains))
|
||||
{
|
||||
whereClauses.Add("Name like @NameContains");
|
||||
cmd.Parameters.Add(cmd, "@NameContains", DbType.String).Value = "%"+query.NameContains+"%";
|
||||
}
|
||||
|
||||
return whereClauses;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user