mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Clean up and document CollectionImageProvider.cs
This commit is contained in:
parent
f29e6badb3
commit
77df0c943b
@ -1,5 +1,3 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Emby.Server.Implementations.Images;
|
||||
@ -15,8 +13,18 @@ using MediaBrowser.Model.IO;
|
||||
|
||||
namespace Emby.Server.Implementations.Collections
|
||||
{
|
||||
/// <summary>
|
||||
/// A collection image provider.
|
||||
/// </summary>
|
||||
public class CollectionImageProvider : BaseDynamicImageProvider<BoxSet>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CollectionImageProvider"/> class.
|
||||
/// </summary>
|
||||
/// <param name="fileSystem">The filesystem.</param>
|
||||
/// <param name="providerManager">The provider manager.</param>
|
||||
/// <param name="applicationPaths">The application paths.</param>
|
||||
/// <param name="imageProcessor">The image processor.</param>
|
||||
public CollectionImageProvider(
|
||||
IFileSystem fileSystem,
|
||||
IProviderManager providerManager,
|
||||
@ -48,13 +56,10 @@ namespace Emby.Server.Implementations.Collections
|
||||
|
||||
var episode = subItem as Episode;
|
||||
|
||||
if (episode != null)
|
||||
var series = episode?.Series;
|
||||
if (series != null && series.HasImage(ImageType.Primary))
|
||||
{
|
||||
var series = episode.Series;
|
||||
if (series != null && series.HasImage(ImageType.Primary))
|
||||
{
|
||||
return series;
|
||||
}
|
||||
return series;
|
||||
}
|
||||
|
||||
if (subItem.HasImage(ImageType.Primary))
|
||||
|
Loading…
x
Reference in New Issue
Block a user