add NameStartsWith and NameLessThan filters to Person search

This commit is contained in:
dkanada 2026-04-12 12:42:49 +09:00
parent eacdc83fda
commit 22644075e7
3 changed files with 20 additions and 0 deletions

View file

@ -235,6 +235,16 @@ public class PeopleRepository(IDbContextFactory<JellyfinDbContext> dbProvider, I
query = query.Where(e => e.Name.ToUpper().Contains(nameContainsUpper));
}
if (!string.IsNullOrWhiteSpace(filter.NameStartsWith))
{
query = query.Where(e => e.Name.StartsWith(filter.NameStartsWith.ToLowerInvariant()));
}
if (!string.IsNullOrWhiteSpace(filter.NameLessThan))
{
query = query.Where(e => e.Name.CompareTo(filter.NameLessThan.ToLowerInvariant()) < 0);
}
return query;
}