private static ChannelItemInfo CreateChannelItemInfo(LiveSchedule liveSchedule)
        {
            var id       = LiveVideoProvider.CreateId(liveSchedule.Id);
            var name     = ChannelInfoHelper.FormatMatchName(liveSchedule.HomeTeam, liveSchedule.AwayTeam);
            var overview = string.Format("Starts at {0}<br>Event: {1}<br>Feed type: {2}", liveSchedule.StartTime, liveSchedule.Event, liveSchedule.FeedType);

            return(ChannelInfoHelper.CreateChannelItemInfo(id, name, overview, DateTime.Today));
        }
        private ChannelItemInfo CreateChannelItemInfo(OnDemandObject onDemandObject)
        {
            var id       = OnDemandVideoProvider.CreateId(onDemandObject.Id);
            var name     = ChannelInfoHelper.FormatMatchName(onDemandObject.HomeTeam, onDemandObject.AwayTeam);
            var overview = string.Format("Played on {0}<br>Event: {1}<br>Feed type: {2}", onDemandObject.Date, onDemandObject.Event, onDemandObject.FeedType);
            var date     = ChannelInfoHelper.ParseDate(onDemandObject.Date);

            return(ChannelInfoHelper.CreateChannelItemInfo(id, name, overview, date));
        }
Exemplo n.º 3
0
        private ChannelItemInfo CreateChannelItemInfo(HighlightsObject highlightsObject)
        {
            var id       = CondensedVideoProvider.CreateId(highlightsObject.Id);
            var name     = ChannelInfoHelper.FormatFavoriteMatchName(highlightsObject.HomeTeam, highlightsObject.AwayTeam);
            var overview = string.Format("Played on {0}<br>Event: {1}", highlightsObject.Date, highlightsObject.Event);
            var date     = ChannelInfoHelper.ParseDate(highlightsObject.Date);

            return(ChannelInfoHelper.CreateChannelItemInfo(id, name, overview, date));
        }
Exemplo n.º 4
0
        public async Task <IEnumerable <ChannelItemInfo> > GetFolders(string folderId, CancellationToken cancellationToken)
        {
            var dates = await _baseStreamsService.GetOnDemandDates(cancellationToken);

            return(dates.Dates.Select(date =>
            {
                var id = GetChildFolderId(folderId, date);
                return ChannelInfoHelper.CreateFolder(id, date, null);
            }));
        }
        public Task <IEnumerable <ChannelItemInfo> > GetFolders(string folderId, CancellationToken cancellationToken)
        {
            var channelItemInfos = new List <ChannelItemInfo>
            {
                ChannelInfoHelper.CreateFolder(FavoriteOnDemandFolderProvider.CreateId(), Resources.OnDemand, ""),
                ChannelInfoHelper.CreateFolder(FavoriteCondensedFolderProvider.CreateId(), Resources.Condensed, ""),
                // Highlights are not working (all or a lot of the urls are placeholders)
                //ChannelInfoHelper.CreateFolder(FavoriteHighlightsFolderProvider.CreateId(), Resources.OnDemand, ""),
            };

            return(Task.FromResult <IEnumerable <ChannelItemInfo> >(channelItemInfos));
        }
        private IEnumerable <ChannelItemInfo> CreateHomeFolders()
        {
            yield return(ChannelInfoHelper.CreateFolder(LiveFolderProvider.CreateId(), Resources.Live, ""));

            if (!string.IsNullOrEmpty(FavoriteTeam))
            {
                yield return
                    (ChannelInfoHelper.CreateFolder(FavoriteFolderProvider.CreateId(), FavoriteTeam, ""));
            }

            yield return(ChannelInfoHelper.CreateFolder(DatesFolderProvider.CreateOnDemandId(), Resources.OnDemand, ""));

            yield return(ChannelInfoHelper.CreateFolder(DatesFolderProvider.CreateCondensedId(), Resources.Condensed, ""));
            // Highlights are not working (all or a lot of the urls are placeholders)
            //yield return ChannelInfoHelper.CreateFolder(DatesFolderProvider.CreateHighlightsId(), Resources.Highlights, "");
        }
        public async Task <string> GetVideoUrl(string id, CancellationToken cancellationToken)
        {
            var streamInfo = await GetStreamInfo(id, cancellationToken);

            return(ChannelInfoHelper.FirstNotNull(streamInfo.HighQualitySrc, streamInfo.MedQualitySrc, streamInfo.LowQualitySrc));
        }