mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-03 19:17:24 -05:00 
			
		
		
		
	Clean up and document ChannelDynamicMediaSourceProvider.cs
This commit is contained in:
		
							parent
							
								
									4c0547f90c
								
							
						
					
					
						commit
						543c76a8f1
					
				@ -1,5 +1,3 @@
 | 
				
			|||||||
#pragma warning disable CS1591
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
using System;
 | 
					using System;
 | 
				
			||||||
using System.Collections.Generic;
 | 
					using System.Collections.Generic;
 | 
				
			||||||
using System.Threading;
 | 
					using System.Threading;
 | 
				
			||||||
@ -11,6 +9,9 @@ using MediaBrowser.Model.Dto;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
namespace Emby.Server.Implementations.Channels
 | 
					namespace Emby.Server.Implementations.Channels
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					    /// <summary>
 | 
				
			||||||
 | 
					    /// A media source provider for channels.
 | 
				
			||||||
 | 
					    /// </summary>
 | 
				
			||||||
    public class ChannelDynamicMediaSourceProvider : IMediaSourceProvider
 | 
					    public class ChannelDynamicMediaSourceProvider : IMediaSourceProvider
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        private readonly ChannelManager _channelManager;
 | 
					        private readonly ChannelManager _channelManager;
 | 
				
			||||||
@ -27,12 +28,9 @@ namespace Emby.Server.Implementations.Channels
 | 
				
			|||||||
        /// <inheritdoc />
 | 
					        /// <inheritdoc />
 | 
				
			||||||
        public Task<IEnumerable<MediaSourceInfo>> GetMediaSources(BaseItem item, CancellationToken cancellationToken)
 | 
					        public Task<IEnumerable<MediaSourceInfo>> GetMediaSources(BaseItem item, CancellationToken cancellationToken)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            if (item.SourceType == SourceType.Channel)
 | 
					            return item.SourceType == SourceType.Channel
 | 
				
			||||||
            {
 | 
					                ? _channelManager.GetDynamicMediaSources(item, cancellationToken)
 | 
				
			||||||
                return _channelManager.GetDynamicMediaSources(item, cancellationToken);
 | 
					                : Task.FromResult<IEnumerable<MediaSourceInfo>>(new List<MediaSourceInfo>());
 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
            return Task.FromResult<IEnumerable<MediaSourceInfo>>(new List<MediaSourceInfo>());
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /// <inheritdoc />
 | 
					        /// <inheritdoc />
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user