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");

View File

@@ -157,6 +157,7 @@ namespace Emby.Server.Implementations.Library
}
AddIfMissing(excludeItemTypes, typeof(CollectionFolder).Name);
AddIfMissing(excludeItemTypes, typeof(Folder).Name);
var mediaItems = _libraryManager.GetItemList(new InternalItemsQuery(user)
{
@@ -164,8 +165,7 @@ namespace Emby.Server.Implementations.Library
ExcludeItemTypes = excludeItemTypes.ToArray(),
IncludeItemTypes = includeItemTypes.ToArray(),
Limit = query.Limit,
IncludeItemsByName = true,
IsVirtualItem = false
IncludeItemsByName = true
});
// Add search hints based on item name

View File

@@ -287,7 +287,7 @@ namespace Emby.Server.Implementations.Library
SortBy = new[] { ItemSortBy.DateCreated },
IsFolder = includeItemTypes.Length == 0 ? false : (bool?)null,
ExcludeItemTypes = excludeItemTypes,
ExcludeLocationTypes = new[] { LocationType.Virtual },
IsVirtualItem = false,
Limit = limit * 5,
SourceTypes = parents.Count == 0 ? new[] { SourceType.Library } : new SourceType[] { },
IsPlayed = request.IsPlayed

View File

@@ -1602,7 +1602,7 @@ namespace Emby.Server.Implementations.LiveTv
Recursive = true,
AncestorIds = folders.Select(i => i.Id.ToString("N")).ToArray(),
IsFolder = false,
ExcludeLocationTypes = new[] { LocationType.Virtual },
IsVirtualItem = false,
Limit = query.Limit,
SortBy = new[] { ItemSortBy.DateCreated },
SortOrder = SortOrder.Descending,