add db startup error handling

This commit is contained in:
Luke Pulverenti
2017-02-17 16:11:13 -05:00
parent b51f00feb6
commit 36f8eb1149
16 changed files with 307 additions and 61 deletions

View File

@@ -248,6 +248,13 @@ namespace Emby.Server.Implementations.Library
}
}
var isPlayed = request.IsPlayed;
if (parents.OfType<ICollectionFolder>().Any(i => string.Equals(i.CollectionType, CollectionType.Music, StringComparison.OrdinalIgnoreCase)))
{
isPlayed = null;
}
if (parents.Count == 0)
{
parents = user.RootFolder.GetChildren(user, true)
@@ -282,7 +289,7 @@ namespace Emby.Server.Implementations.Library
IsVirtualItem = false,
Limit = limit * 5,
SourceTypes = parents.Count == 0 ? new[] { SourceType.Library } : new SourceType[] { },
IsPlayed = request.IsPlayed
IsPlayed = isPlayed
}, parents);
}