aboutsummaryrefslogtreecommitdiff
path: root/src/Jellyfin.Drawing/ImageProcessor.cs
diff options
context:
space:
mode:
authorGOvEy1nw <45126527+GOvEy1nw@users.noreply.github.com>2026-07-29 17:37:36 +0100
committerGOvEy1nw <45126527+GOvEy1nw@users.noreply.github.com>2026-07-29 17:37:36 +0100
commit3da05330b27dd94773c7fc1de0d44a65d0a978a7 (patch)
treeee3416acb809cfe2ccb6ef316e847d682233737c /src/Jellyfin.Drawing/ImageProcessor.cs
parentafb716566d04102fa6c8e1b12977d175db301081 (diff)
fix(images): disambiguate progress overlay cache keys
Diffstat (limited to 'src/Jellyfin.Drawing/ImageProcessor.cs')
-rw-r--r--src/Jellyfin.Drawing/ImageProcessor.cs26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/Jellyfin.Drawing/ImageProcessor.cs b/src/Jellyfin.Drawing/ImageProcessor.cs
index 6ffb022842..f906ad10ab 100644
--- a/src/Jellyfin.Drawing/ImageProcessor.cs
+++ b/src/Jellyfin.Drawing/ImageProcessor.cs
@@ -31,7 +31,7 @@ namespace Jellyfin.Drawing;
public sealed class ImageProcessor : IImageProcessor, IDisposable
{
// Increment this when there's a change requiring caches to be invalidated
- private const char Version = '3';
+ private const char Version = '4';
private static readonly HashSet<string> _transparentImageTypes
= new HashSet<string>(StringComparer.OrdinalIgnoreCase) { ".png", ".webp", ".gif", ".svg" };
@@ -251,7 +251,23 @@ public sealed class ImageProcessor : IImageProcessor, IDisposable
/// <summary>
/// Gets the cache file path based on a set of parameters.
/// </summary>
- private string GetCacheFilePath(
+ /// <param name="originalPath">The original image path.</param>
+ /// <param name="width">The requested width.</param>
+ /// <param name="height">The requested height.</param>
+ /// <param name="maxWidth">The maximum width.</param>
+ /// <param name="maxHeight">The maximum height.</param>
+ /// <param name="fillWidth">The fill width.</param>
+ /// <param name="fillHeight">The fill height.</param>
+ /// <param name="quality">The image quality.</param>
+ /// <param name="dateModified">The source image modification date.</param>
+ /// <param name="format">The output format.</param>
+ /// <param name="percentPlayed">The played percentage overlay value.</param>
+ /// <param name="unwatchedCount">The unwatched count overlay value.</param>
+ /// <param name="blur">The blur amount.</param>
+ /// <param name="backgroundColor">The background color.</param>
+ /// <param name="foregroundLayer">The foreground layer.</param>
+ /// <returns>The transformed image cache path.</returns>
+ internal string GetCacheFilePath(
string originalPath,
int? width,
int? height,
@@ -318,13 +334,13 @@ public sealed class ImageProcessor : IImageProcessor, IDisposable
if (percentPlayed > 0)
{
- filename.Append(",p=");
- filename.Append(percentPlayed);
+ filename.Append(",pp=");
+ filename.Append(percentPlayed.ToString(CultureInfo.InvariantCulture));
}
if (unwatchedCount.HasValue)
{
- filename.Append(",p=");
+ filename.Append(",uc=");
filename.Append(unwatchedCount.Value);
}