aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
authorEric Reed <ebr@mediabrowser3.com>2013-05-23 11:45:13 -0400
committerEric Reed <ebr@mediabrowser3.com>2013-05-23 11:45:13 -0400
commitf4a199d27579a69c141ec311662a13b090779d82 (patch)
treefc68eb634f41d1792453c0080113eebab1ae0680 /MediaBrowser.Controller
parent8452e2f1250b37aa6584faed2bb9d36ddef0a1b2 (diff)
Change image enhancer LastConfigurationChange to ConfigurationCacheKey
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Drawing/ImageManager.cs2
-rw-r--r--MediaBrowser.Controller/Providers/IImageEnhancer.cs6
2 files changed, 4 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/Drawing/ImageManager.cs b/MediaBrowser.Controller/Drawing/ImageManager.cs
index 2d2bd5ae8..59b5eb8a3 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 24296b664..b4700aa83 100644
--- a/MediaBrowser.Controller/Providers/IImageEnhancer.cs
+++ b/MediaBrowser.Controller/Providers/IImageEnhancer.cs
@@ -24,12 +24,12 @@ namespace MediaBrowser.Controller.Providers
MetadataProviderPriority Priority { get; }
/// <summary>
- /// 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
/// </summary>
/// <param name="item">The item.</param>
/// <param name="imageType">Type of the image.</param>
- /// <returns>Date of last config change</returns>
- DateTime LastConfigurationChange(BaseItem item, ImageType imageType);
+ /// <returns>Cache key relating to the current state of this item and configuration</returns>
+ string ConfigurationCacheKey(BaseItem item, ImageType imageType);
/// <summary>
/// Gets the size of the enhanced image.