|  | @@ -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))
 |