mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-04 03:27:21 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			37 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
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;
 | 
						|
 | 
						|
namespace Emby.Server.Implementations.Channels
 | 
						|
{
 | 
						|
    public class ChannelDynamicMediaSourceProvider : IMediaSourceProvider
 | 
						|
    {
 | 
						|
        private readonly ChannelManager _channelManager;
 | 
						|
 | 
						|
        public ChannelDynamicMediaSourceProvider(IChannelManager channelManager)
 | 
						|
        {
 | 
						|
            _channelManager = (ChannelManager)channelManager;
 | 
						|
        }
 | 
						|
 | 
						|
        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>());
 | 
						|
        }
 | 
						|
 | 
						|
        public Task<ILiveStream> OpenMediaSource(string openToken, List<ILiveStream> currentLiveStreams, CancellationToken cancellationToken)
 | 
						|
        {
 | 
						|
            throw new NotImplementedException();
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |