From 2c920cff33f8e765b79e805d96f3bc547bc7b3fc Mon Sep 17 00:00:00 2001 From: Patrick Barron Date: Tue, 14 Apr 2020 15:29:57 -0400 Subject: [PATCH] Document ChannelImageProvider.cs --- .../Channels/ChannelImageProvider.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Emby.Server.Implementations/Channels/ChannelImageProvider.cs b/Emby.Server.Implementations/Channels/ChannelImageProvider.cs index 62aeb9bcb..c08a237fb 100644 --- a/Emby.Server.Implementations/Channels/ChannelImageProvider.cs +++ b/Emby.Server.Implementations/Channels/ChannelImageProvider.cs @@ -1,5 +1,3 @@ -#pragma warning disable CS1591 - using System.Collections.Generic; using System.Linq; using System.Threading; @@ -11,20 +9,29 @@ using MediaBrowser.Model.Entities; namespace Emby.Server.Implementations.Channels { + /// + /// An image provider for channels. + /// public class ChannelImageProvider : IDynamicImageProvider, IHasItemChangeMonitor { private readonly IChannelManager _channelManager; + /// + /// Initializes a new instance of the class. + /// + /// The channel manager. public ChannelImageProvider(IChannelManager channelManager) { _channelManager = channelManager; } + /// public IEnumerable GetSupportedImages(BaseItem item) { return GetChannel(item).GetSupportedChannelImages(); } + /// public Task GetImage(BaseItem item, ImageType type, CancellationToken cancellationToken) { var channel = GetChannel(item); @@ -32,8 +39,10 @@ namespace Emby.Server.Implementations.Channels return channel.GetChannelImage(type, cancellationToken); } + /// public string Name => "Channel Image Provider"; + /// public bool Supports(BaseItem item) { return item is Channel; @@ -46,6 +55,7 @@ namespace Emby.Server.Implementations.Channels return ((ChannelManager)_channelManager).GetChannelProvider(channel); } + /// public bool HasChanged(BaseItem item, IDirectoryService directoryService) { return GetSupportedImages(item).Any(i => !item.HasImage(i));