Remove conditions that are always true/false

This commit is contained in:
Bond_009
2019-01-21 20:18:52 +01:00
parent edcfd8b565
commit 722120af74
12 changed files with 56 additions and 116 deletions

View File

@@ -681,22 +681,17 @@ namespace Emby.Server.Implementations.Channels
// Find the corresponding channel provider plugin
var channelProvider = GetChannelProvider(channel);
var user = query.User;
ChannelItemSortField? sortField = null;
var sortDescending = false;
var parentItem = !query.ParentId.Equals(Guid.Empty) ? _libraryManager.GetItemById(query.ParentId) : channel;
var parentItem = query.ParentId == Guid.Empty ? channel : _libraryManager.GetItemById(query.ParentId);
var itemsResult = await GetChannelItems(channelProvider,
user,
query.User,
parentItem is Channel ? null : parentItem.ExternalId,
sortField,
sortDescending,
null,
false,
cancellationToken)
.ConfigureAwait(false);
if (query.ParentId.Equals(Guid.Empty))
if (query.ParentId == Guid.Empty)
{
query.Parent = channel;
}