2019-11-01 17:38:54 +00:00
|
|
|
#pragma warning disable CS1591
|
2019-12-10 23:13:57 +00:00
|
|
|
#pragma warning disable SA1600
|
2019-11-01 17:38:54 +00:00
|
|
|
|
2019-01-13 19:54:44 +00:00
|
|
|
using System;
|
2015-03-28 20:22:27 +00:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Threading;
|
|
|
|
using System.Threading.Tasks;
|
2019-01-13 19:20:16 +00:00
|
|
|
using MediaBrowser.Controller.Channels;
|
|
|
|
using MediaBrowser.Controller.Entities;
|
|
|
|
using MediaBrowser.Controller.Library;
|
|
|
|
using MediaBrowser.Model.Dto;
|
2015-03-28 20:22:27 +00:00
|
|
|
|
2016-11-02 20:53:50 +00:00
|
|
|
namespace Emby.Server.Implementations.Channels
|
2015-03-28 20:22:27 +00:00
|
|
|
{
|
|
|
|
public class ChannelDynamicMediaSourceProvider : IMediaSourceProvider
|
|
|
|
{
|
|
|
|
private readonly ChannelManager _channelManager;
|
|
|
|
|
2019-11-01 17:38:54 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Initializes a new instance of the <see cref="ChannelDynamicMediaSourceProvider"/> class.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="channelManager">The channel manager.</param>
|
2015-03-28 20:22:27 +00:00
|
|
|
public ChannelDynamicMediaSourceProvider(IChannelManager channelManager)
|
|
|
|
{
|
|
|
|
_channelManager = (ChannelManager)channelManager;
|
|
|
|
}
|
|
|
|
|
2019-11-01 17:38:54 +00:00
|
|
|
/// <inheritdoc />
|
2018-09-12 17:26:21 +00:00
|
|
|
public Task<IEnumerable<MediaSourceInfo>> GetMediaSources(BaseItem item, CancellationToken cancellationToken)
|
2015-03-28 20:22:27 +00:00
|
|
|
{
|
2018-09-12 17:26:21 +00:00
|
|
|
if (item.SourceType == SourceType.Channel)
|
2015-03-28 20:22:27 +00:00
|
|
|
{
|
2018-09-12 17:26:21 +00:00
|
|
|
return _channelManager.GetDynamicMediaSources(item, cancellationToken);
|
2015-03-28 20:22:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return Task.FromResult<IEnumerable<MediaSourceInfo>>(new List<MediaSourceInfo>());
|
|
|
|
}
|
|
|
|
|
2019-11-01 17:38:54 +00:00
|
|
|
/// <inheritdoc />
|
2018-09-12 17:26:21 +00:00
|
|
|
public Task<ILiveStream> OpenMediaSource(string openToken, List<ILiveStream> currentLiveStreams, CancellationToken cancellationToken)
|
2015-03-28 20:22:27 +00:00
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|