private async Task <ChannelItemResult> GetChannels(CancellationToken cancellationToken)
        {
            var downloader = new Revision3ChannelDownloader(_logger, _jsonSerializer, _httpClient);
            var channels   = await downloader.GetRevision3ChannelList(cancellationToken);

            var shows = channels.shows.Select(i => new ChannelItemInfo
            {
                Type     = ChannelItemType.Folder,
                ImageUrl = i.images.logo_200,
                Name     = i.name,
                Id       = i.id,
                Overview = i.summary
            });

            return(new ChannelItemResult
            {
                Items = shows.ToList(),
                TotalRecordCount = channels.total
            });
        }
예제 #2
0
        private async Task<ChannelItemResult> GetChannels(CancellationToken cancellationToken)
        {
            var downloader = new Revision3ChannelDownloader(_logger, _jsonSerializer, _httpClient);
            var channels = await downloader.GetRevision3ChannelList(cancellationToken);

            var shows = channels.shows.Select(i => new ChannelItemInfo
            {
                Type = ChannelItemType.Folder,
                ImageUrl = i.images.logo_200,
                Name = i.name,
                Id = i.id,
                Overview = i.summary
            });

            return new ChannelItemResult
            {
                Items = shows.ToList(),
                TotalRecordCount = channels.total
            };
        }