update video osd

This commit is contained in:
Luke Pulverenti
2017-01-09 12:05:34 -05:00
parent 3b7b06f70b
commit 85cd90d6e6
13 changed files with 39 additions and 35 deletions

View File

@@ -3208,6 +3208,11 @@ namespace Emby.Server.Implementations.Data
private List<string> GetWhereClauses(InternalItemsQuery query, IStatement statement, string paramSuffix = "")
{
if (query.IsResumable ?? false)
{
query.IsVirtualItem = false;
}
var whereClauses = new List<string>();
if (EnableJoinUserData(query))
@@ -4081,27 +4086,6 @@ namespace Emby.Server.Implementations.Data
whereClauses.Add("LocationType in (" + val + ")");
}
if (query.ExcludeLocationTypes.Length == 1)
{
if (query.ExcludeLocationTypes[0] == LocationType.Virtual && _config.Configuration.SchemaVersion >= 90)
{
query.IsVirtualItem = false;
}
else
{
whereClauses.Add("LocationType<>@ExcludeLocationTypes");
if (statement != null)
{
statement.TryBind("@ExcludeLocationTypes", query.ExcludeLocationTypes[0].ToString());
}
}
}
else if (query.ExcludeLocationTypes.Length > 1)
{
var val = string.Join(",", query.ExcludeLocationTypes.Select(i => "'" + i + "'").ToArray());
whereClauses.Add("LocationType not in (" + val + ")");
}
if (query.IsVirtualItem.HasValue)
{
whereClauses.Add("IsVirtualItem=@IsVirtualItem");