mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 10:29:01 -07:00
07cc4be6a7
* Add analyzers to MediaBrowser.XbmcMetadata * Enable TreatWarningsAsErrors for MediaBrowser.XbmcMetadata * Add analyzers to MediaBrowser.WebDashboard * Enable TreatWarningsAsErrors for MediaBrowser.WebDashboard * Disable SA1600 in favor of CS1591
45 lines
1.5 KiB
C#
45 lines
1.5 KiB
C#
#pragma warning disable CS1591
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using MediaBrowser.Controller.Channels;
|
|
using MediaBrowser.Controller.Entities;
|
|
using MediaBrowser.Controller.Library;
|
|
using MediaBrowser.Model.Dto;
|
|
|
|
namespace Emby.Server.Implementations.Channels
|
|
{
|
|
public class ChannelDynamicMediaSourceProvider : IMediaSourceProvider
|
|
{
|
|
private readonly ChannelManager _channelManager;
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="ChannelDynamicMediaSourceProvider"/> class.
|
|
/// </summary>
|
|
/// <param name="channelManager">The channel manager.</param>
|
|
public ChannelDynamicMediaSourceProvider(IChannelManager channelManager)
|
|
{
|
|
_channelManager = (ChannelManager)channelManager;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public Task<IEnumerable<MediaSourceInfo>> GetMediaSources(BaseItem item, CancellationToken cancellationToken)
|
|
{
|
|
if (item.SourceType == SourceType.Channel)
|
|
{
|
|
return _channelManager.GetDynamicMediaSources(item, cancellationToken);
|
|
}
|
|
|
|
return Task.FromResult<IEnumerable<MediaSourceInfo>>(new List<MediaSourceInfo>());
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public Task<ILiveStream> OpenMediaSource(string openToken, List<ILiveStream> currentLiveStreams, CancellationToken cancellationToken)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|