2015-03-28 16:22:27 -04:00
|
|
|
|
using MediaBrowser.Controller.Channels;
|
|
|
|
|
using MediaBrowser.Controller.Entities;
|
|
|
|
|
using MediaBrowser.Controller.Library;
|
|
|
|
|
using MediaBrowser.Model.Dto;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2016-11-02 16:53:50 -04:00
|
|
|
|
namespace Emby.Server.Implementations.Channels
|
2015-03-28 16:22:27 -04:00
|
|
|
|
{
|
|
|
|
|
public class ChannelDynamicMediaSourceProvider : IMediaSourceProvider
|
|
|
|
|
{
|
|
|
|
|
private readonly ChannelManager _channelManager;
|
|
|
|
|
|
|
|
|
|
public ChannelDynamicMediaSourceProvider(IChannelManager channelManager)
|
|
|
|
|
{
|
|
|
|
|
_channelManager = (ChannelManager)channelManager;
|
|
|
|
|
}
|
|
|
|
|
|
2018-09-12 13:26:21 -04:00
|
|
|
|
public Task<IEnumerable<MediaSourceInfo>> GetMediaSources(BaseItem item, CancellationToken cancellationToken)
|
2015-03-28 16:22:27 -04:00
|
|
|
|
{
|
2018-09-12 13:26:21 -04:00
|
|
|
|
if (item.SourceType == SourceType.Channel)
|
2015-03-28 16:22:27 -04:00
|
|
|
|
{
|
2018-09-12 13:26:21 -04:00
|
|
|
|
return _channelManager.GetDynamicMediaSources(item, cancellationToken);
|
2015-03-28 16:22:27 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Task.FromResult<IEnumerable<MediaSourceInfo>>(new List<MediaSourceInfo>());
|
|
|
|
|
}
|
|
|
|
|
|
2018-09-12 13:26:21 -04:00
|
|
|
|
public Task<ILiveStream> OpenMediaSource(string openToken, List<ILiveStream> currentLiveStreams, CancellationToken cancellationToken)
|
2015-03-28 16:22:27 -04:00
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|