예제 #1
0
        public Task <IEnumerable <MediaSourceInfo> > GetMediaSources(IHasMediaSources item, CancellationToken cancellationToken)
        {
            var baseItem = (BaseItem)item;

            if (baseItem.SourceType == SourceType.Channel)
            {
                return(_channelManager.GetDynamicMediaSources(baseItem, cancellationToken));
            }

            return(Task.FromResult <IEnumerable <MediaSourceInfo> >(new List <MediaSourceInfo>()));
        }
        public Task <IEnumerable <MediaSourceInfo> > GetMediaSources(IHasMediaSources item, CancellationToken cancellationToken)
        {
            var channelItem = item as IChannelMediaItem;

            if (channelItem != null)
            {
                return(_channelManager.GetDynamicMediaSources(channelItem, cancellationToken));
            }

            return(Task.FromResult <IEnumerable <MediaSourceInfo> >(new List <MediaSourceInfo>()));
        }