From f4a199d27579a69c141ec311662a13b090779d82 Mon Sep 17 00:00:00 2001 From: Eric Reed Date: Thu, 23 May 2013 11:45:13 -0400 Subject: Change image enhancer LastConfigurationChange to ConfigurationCacheKey --- MediaBrowser.Controller/Drawing/ImageManager.cs | 2 +- MediaBrowser.Controller/Providers/IImageEnhancer.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'MediaBrowser.Controller') diff --git a/MediaBrowser.Controller/Drawing/ImageManager.cs b/MediaBrowser.Controller/Drawing/ImageManager.cs index 2d2bd5ae8a..59b5eb8a3b 100644 --- a/MediaBrowser.Controller/Drawing/ImageManager.cs +++ b/MediaBrowser.Controller/Drawing/ImageManager.cs @@ -642,7 +642,7 @@ namespace MediaBrowser.Controller.Drawing } // Cache name is created with supported enhancers combined with the last config change so we pick up new config changes - var cacheKeys = imageEnhancers.Select(i => i.GetType().Name + i.LastConfigurationChange(item, imageType).Ticks).ToList(); + var cacheKeys = imageEnhancers.Select(i => i.ConfigurationCacheKey(item, imageType)).ToList(); cacheKeys.Add(originalImagePath + dateModified.Ticks); return string.Join("|", cacheKeys.ToArray()).GetMD5(); diff --git a/MediaBrowser.Controller/Providers/IImageEnhancer.cs b/MediaBrowser.Controller/Providers/IImageEnhancer.cs index 24296b6641..b4700aa833 100644 --- a/MediaBrowser.Controller/Providers/IImageEnhancer.cs +++ b/MediaBrowser.Controller/Providers/IImageEnhancer.cs @@ -24,12 +24,12 @@ namespace MediaBrowser.Controller.Providers MetadataProviderPriority Priority { get; } /// - /// Return the date of the last configuration change affecting the provided baseitem and image type + /// Return a key incorporating all configuration information related to this item /// /// The item. /// Type of the image. - /// Date of last config change - DateTime LastConfigurationChange(BaseItem item, ImageType imageType); + /// Cache key relating to the current state of this item and configuration + string ConfigurationCacheKey(BaseItem item, ImageType imageType); /// /// Gets the size of the enhanced image. -- cgit v1.2.3