mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
add name, index number params
This commit is contained in:
parent
4c9406bfa6
commit
2eef80f96e
@ -48,6 +48,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
public string PresentationUniqueKey { get; set; }
|
||||
public string Path { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Person { get; set; }
|
||||
public string[] PersonIds { get; set; }
|
||||
@ -107,6 +108,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
internal List<Guid> ItemIdsFromPersonFilters { get; set; }
|
||||
public int? ParentIndexNumber { get; set; }
|
||||
public int? IndexNumber { get; set; }
|
||||
public int? MinParentalRating { get; set; }
|
||||
public int? MaxParentalRating { get; set; }
|
||||
|
||||
|
@ -1966,9 +1966,14 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
// cmd.Parameters.Add(cmd, "@MaxPlayers", DbType.Int32).Value = query.MaxPlayers.Value;
|
||||
//}
|
||||
|
||||
if (query.IndexNumber.HasValue)
|
||||
{
|
||||
whereClauses.Add("IndexNumber=@IndexNumber");
|
||||
cmd.Parameters.Add(cmd, "@IndexNumber", DbType.Int32).Value = query.IndexNumber.Value;
|
||||
}
|
||||
if (query.ParentIndexNumber.HasValue)
|
||||
{
|
||||
whereClauses.Add("ParentIndexNumber=@MinEndDate");
|
||||
whereClauses.Add("ParentIndexNumber=@ParentIndexNumber");
|
||||
cmd.Parameters.Add(cmd, "@ParentIndexNumber", DbType.Int32).Value = query.ParentIndexNumber.Value;
|
||||
}
|
||||
if (query.MinEndDate.HasValue)
|
||||
@ -2065,6 +2070,19 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||
cmd.Parameters.Add(cmd, "@PersonName", DbType.String).Value = query.Person;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(query.Name))
|
||||
{
|
||||
if (_config.Configuration.SchemaVersion >= 66)
|
||||
{
|
||||
whereClauses.Add("CleanName=@Name");
|
||||
}
|
||||
else
|
||||
{
|
||||
whereClauses.Add("Name=@Name");
|
||||
}
|
||||
cmd.Parameters.Add(cmd, "@Name", DbType.String).Value = query.Name;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(query.NameContains))
|
||||
{
|
||||
if (_config.Configuration.SchemaVersion >= 66)
|
||||
|
Loading…
x
Reference in New Issue
Block a user