Merge pull request #1898 from MediaBrowser/dev

update channel queries
This commit is contained in:
Luke 2016-06-30 15:26:05 -04:00 committed by GitHub
commit 5bdc96bb6a

View File

@ -33,6 +33,7 @@ using System.Net;
using System.Threading;
using System.Threading.Tasks;
using CommonIO;
using MediaBrowser.Model.Channels;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Extensions;
using MediaBrowser.Model.Library;
@ -1512,8 +1513,13 @@ namespace MediaBrowser.Server.Implementations.Library
}
if (string.Equals(view.ViewType, CollectionType.Channels))
{
// TODO: Return channels
return new[] { view };
var channelResult = BaseItem.ChannelManager.GetChannelsInternal(new ChannelQuery
{
UserId = user.Id.ToString("N")
}, CancellationToken.None).Result;
return channelResult.Items;
}
// Translate view into folders