mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-24 09:44:47 +03:00
update image magick sharp
This commit is contained in:
@@ -350,9 +350,9 @@ namespace MediaBrowser.Server.Implementations.Drawing
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Increment this when indicator drawings change
|
||||
/// Increment this when there's a change requiring caches to be invalidated
|
||||
/// </summary>
|
||||
private const string IndicatorVersion = "2";
|
||||
private const string Version = "3";
|
||||
|
||||
/// <summary>
|
||||
/// Gets the cache file path based on a set of parameters
|
||||
@@ -371,29 +371,19 @@ namespace MediaBrowser.Server.Implementations.Drawing
|
||||
|
||||
filename += "f=" + format;
|
||||
|
||||
var hasIndicator = false;
|
||||
|
||||
if (addPlayedIndicator)
|
||||
{
|
||||
filename += "pl=true";
|
||||
hasIndicator = true;
|
||||
}
|
||||
|
||||
if (percentPlayed > 0)
|
||||
{
|
||||
filename += "p=" + percentPlayed;
|
||||
hasIndicator = true;
|
||||
}
|
||||
|
||||
if (unwatchedCount.HasValue)
|
||||
{
|
||||
filename += "p=" + unwatchedCount.Value;
|
||||
hasIndicator = true;
|
||||
}
|
||||
|
||||
if (hasIndicator)
|
||||
{
|
||||
filename += "iv=" + IndicatorVersion;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(backgroundColor))
|
||||
@@ -401,6 +391,8 @@ namespace MediaBrowser.Server.Implementations.Drawing
|
||||
filename += "b=" + backgroundColor;
|
||||
}
|
||||
|
||||
filename += "v=" + Version;
|
||||
|
||||
return GetCachePath(ResizedImageCachePath, filename, "." + format.ToString().ToLower());
|
||||
}
|
||||
|
||||
@@ -671,30 +663,6 @@ namespace MediaBrowser.Server.Implementations.Drawing
|
||||
return enhancedImagePath;
|
||||
}
|
||||
|
||||
private ImageFormat GetFormat(string path)
|
||||
{
|
||||
var extension = Path.GetExtension(path);
|
||||
|
||||
if (string.Equals(extension, ".png", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return ImageFormat.Png;
|
||||
}
|
||||
if (string.Equals(extension, ".gif", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return ImageFormat.Gif;
|
||||
}
|
||||
if (string.Equals(extension, ".webp", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return ImageFormat.Webp;
|
||||
}
|
||||
if (string.Equals(extension, ".bmp", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return ImageFormat.Bmp;
|
||||
}
|
||||
|
||||
return ImageFormat.Jpg;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes the image enhancers.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user