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