mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-09-01 03:30:06 +00:00
add guide optimizations
This commit is contained in:
parent
a69f8ecb3d
commit
fd6aa72dac
17 changed files with 172 additions and 24 deletions
|
|
@ -414,6 +414,20 @@ namespace MediaBrowser.Server.Implementations.Sync
|
|||
whereClauses.Add("TargetId=@TargetId");
|
||||
cmd.Parameters.Add(cmd, "@TargetId", DbType.String).Value = query.TargetId;
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(query.ExcludeTargetIds))
|
||||
{
|
||||
var excludeIds = (query.ExcludeTargetIds ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (excludeIds.Length == 1)
|
||||
{
|
||||
whereClauses.Add("TargetId<>@ExcludeTargetId");
|
||||
cmd.Parameters.Add(cmd, "@ExcludeTargetId", DbType.String).Value = excludeIds[0];
|
||||
}
|
||||
else if (excludeIds.Length > 1)
|
||||
{
|
||||
whereClauses.Add("TargetId<>@ExcludeTargetId");
|
||||
cmd.Parameters.Add(cmd, "@ExcludeTargetId", DbType.String).Value = excludeIds[0];
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(query.UserId))
|
||||
{
|
||||
whereClauses.Add("UserId=@UserId");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue