Ver Fonte

Remove ability to add a played indicator to images (#9186)

Cody Robibero há 2 anos atrás
pai
commit
abffd160c3

+ 0 - 45
Jellyfin.Api/Controllers/ImageController.cs

@@ -505,7 +505,6 @@ namespace Jellyfin.Api.Controllers
         /// <param name="tag">Optional. Supply the cache tag from the item object to receive strong caching headers.</param>
         /// <param name="cropWhitespace">Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.</param>
         /// <param name="format">Optional. The <see cref="ImageFormat"/> of the returned image.</param>
-        /// <param name="addPlayedIndicator">Optional. Add a played indicator.</param>
         /// <param name="percentPlayed">Optional. Percent to render for the percent played overlay.</param>
         /// <param name="unplayedCount">Optional. Unplayed count overlay to render.</param>
         /// <param name="blur">Optional. Blur image.</param>
@@ -536,7 +535,6 @@ namespace Jellyfin.Api.Controllers
             [FromQuery] string? tag,
             [FromQuery, ParameterObsolete] bool? cropWhitespace,
             [FromQuery] ImageFormat? format,
-            [FromQuery] bool? addPlayedIndicator,
             [FromQuery] double? percentPlayed,
             [FromQuery] int? unplayedCount,
             [FromQuery] int? blur,
@@ -565,7 +563,6 @@ namespace Jellyfin.Api.Controllers
                     quality,
                     fillWidth,
                     fillHeight,
-                    addPlayedIndicator,
                     blur,
                     backgroundColor,
                     foregroundLayer,
@@ -589,7 +586,6 @@ namespace Jellyfin.Api.Controllers
         /// <param name="tag">Optional. Supply the cache tag from the item object to receive strong caching headers.</param>
         /// <param name="cropWhitespace">Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.</param>
         /// <param name="format">Optional. The <see cref="ImageFormat"/> of the returned image.</param>
-        /// <param name="addPlayedIndicator">Optional. Add a played indicator.</param>
         /// <param name="percentPlayed">Optional. Percent to render for the percent played overlay.</param>
         /// <param name="unplayedCount">Optional. Unplayed count overlay to render.</param>
         /// <param name="blur">Optional. Blur image.</param>
@@ -620,7 +616,6 @@ namespace Jellyfin.Api.Controllers
             [FromQuery] string? tag,
             [FromQuery, ParameterObsolete] bool? cropWhitespace,
             [FromQuery] ImageFormat? format,
-            [FromQuery] bool? addPlayedIndicator,
             [FromQuery] double? percentPlayed,
             [FromQuery] int? unplayedCount,
             [FromQuery] int? blur,
@@ -648,7 +643,6 @@ namespace Jellyfin.Api.Controllers
                     quality,
                     fillWidth,
                     fillHeight,
-                    addPlayedIndicator,
                     blur,
                     backgroundColor,
                     foregroundLayer,
@@ -671,7 +665,6 @@ namespace Jellyfin.Api.Controllers
         /// <param name="tag">Optional. Supply the cache tag from the item object to receive strong caching headers.</param>
         /// <param name="cropWhitespace">Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.</param>
         /// <param name="format">Determines the output format of the image - original,gif,jpg,png.</param>
-        /// <param name="addPlayedIndicator">Optional. Add a played indicator.</param>
         /// <param name="percentPlayed">Optional. Percent to render for the percent played overlay.</param>
         /// <param name="unplayedCount">Optional. Unplayed count overlay to render.</param>
         /// <param name="blur">Optional. Blur image.</param>
@@ -702,7 +695,6 @@ namespace Jellyfin.Api.Controllers
             [FromRoute, Required] string tag,
             [FromQuery, ParameterObsolete] bool? cropWhitespace,
             [FromRoute, Required] ImageFormat format,
-            [FromQuery] bool? addPlayedIndicator,
             [FromRoute, Required] double percentPlayed,
             [FromRoute, Required] int unplayedCount,
             [FromQuery] int? blur,
@@ -731,7 +723,6 @@ namespace Jellyfin.Api.Controllers
                     quality,
                     fillWidth,
                     fillHeight,
-                    addPlayedIndicator,
                     blur,
                     backgroundColor,
                     foregroundLayer,
@@ -756,7 +747,6 @@ namespace Jellyfin.Api.Controllers
         /// <param name="fillWidth">Width of box to fill.</param>
         /// <param name="fillHeight">Height of box to fill.</param>
         /// <param name="cropWhitespace">Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.</param>
-        /// <param name="addPlayedIndicator">Optional. Add a played indicator.</param>
         /// <param name="blur">Optional. Blur image.</param>
         /// <param name="backgroundColor">Optional. Apply a background color for transparent images.</param>
         /// <param name="foregroundLayer">Optional. Apply a foreground layer on top of the image.</param>
@@ -787,7 +777,6 @@ namespace Jellyfin.Api.Controllers
             [FromQuery] int? fillWidth,
             [FromQuery] int? fillHeight,
             [FromQuery, ParameterObsolete] bool? cropWhitespace,
-            [FromQuery] bool? addPlayedIndicator,
             [FromQuery] int? blur,
             [FromQuery] string? backgroundColor,
             [FromQuery] string? foregroundLayer,
@@ -814,7 +803,6 @@ namespace Jellyfin.Api.Controllers
                     quality,
                     fillWidth,
                     fillHeight,
-                    addPlayedIndicator,
                     blur,
                     backgroundColor,
                     foregroundLayer,
@@ -839,7 +827,6 @@ namespace Jellyfin.Api.Controllers
         /// <param name="fillWidth">Width of box to fill.</param>
         /// <param name="fillHeight">Height of box to fill.</param>
         /// <param name="cropWhitespace">Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.</param>
-        /// <param name="addPlayedIndicator">Optional. Add a played indicator.</param>
         /// <param name="blur">Optional. Blur image.</param>
         /// <param name="backgroundColor">Optional. Apply a background color for transparent images.</param>
         /// <param name="foregroundLayer">Optional. Apply a foreground layer on top of the image.</param>
@@ -870,7 +857,6 @@ namespace Jellyfin.Api.Controllers
             [FromQuery] int? fillWidth,
             [FromQuery] int? fillHeight,
             [FromQuery, ParameterObsolete] bool? cropWhitespace,
-            [FromQuery] bool? addPlayedIndicator,
             [FromQuery] int? blur,
             [FromQuery] string? backgroundColor,
             [FromQuery] string? foregroundLayer,
@@ -897,7 +883,6 @@ namespace Jellyfin.Api.Controllers
                     quality,
                     fillWidth,
                     fillHeight,
-                    addPlayedIndicator,
                     blur,
                     backgroundColor,
                     foregroundLayer,
@@ -923,7 +908,6 @@ namespace Jellyfin.Api.Controllers
         /// <param name="fillWidth">Width of box to fill.</param>
         /// <param name="fillHeight">Height of box to fill.</param>
         /// <param name="cropWhitespace">Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.</param>
-        /// <param name="addPlayedIndicator">Optional. Add a played indicator.</param>
         /// <param name="blur">Optional. Blur image.</param>
         /// <param name="backgroundColor">Optional. Apply a background color for transparent images.</param>
         /// <param name="foregroundLayer">Optional. Apply a foreground layer on top of the image.</param>
@@ -954,7 +938,6 @@ namespace Jellyfin.Api.Controllers
             [FromQuery] int? fillWidth,
             [FromQuery] int? fillHeight,
             [FromQuery, ParameterObsolete] bool? cropWhitespace,
-            [FromQuery] bool? addPlayedIndicator,
             [FromQuery] int? blur,
             [FromQuery] string? backgroundColor,
             [FromQuery] string? foregroundLayer)
@@ -980,7 +963,6 @@ namespace Jellyfin.Api.Controllers
                     quality,
                     fillWidth,
                     fillHeight,
-                    addPlayedIndicator,
                     blur,
                     backgroundColor,
                     foregroundLayer,
@@ -1005,7 +987,6 @@ namespace Jellyfin.Api.Controllers
         /// <param name="fillWidth">Width of box to fill.</param>
         /// <param name="fillHeight">Height of box to fill.</param>
         /// <param name="cropWhitespace">Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.</param>
-        /// <param name="addPlayedIndicator">Optional. Add a played indicator.</param>
         /// <param name="blur">Optional. Blur image.</param>
         /// <param name="backgroundColor">Optional. Apply a background color for transparent images.</param>
         /// <param name="foregroundLayer">Optional. Apply a foreground layer on top of the image.</param>
@@ -1036,7 +1017,6 @@ namespace Jellyfin.Api.Controllers
             [FromQuery] int? fillWidth,
             [FromQuery] int? fillHeight,
             [FromQuery, ParameterObsolete] bool? cropWhitespace,
-            [FromQuery] bool? addPlayedIndicator,
             [FromQuery] int? blur,
             [FromQuery] string? backgroundColor,
             [FromQuery] string? foregroundLayer,
@@ -1063,7 +1043,6 @@ namespace Jellyfin.Api.Controllers
                     quality,
                     fillWidth,
                     fillHeight,
-                    addPlayedIndicator,
                     blur,
                     backgroundColor,
                     foregroundLayer,
@@ -1089,7 +1068,6 @@ namespace Jellyfin.Api.Controllers
         /// <param name="fillWidth">Width of box to fill.</param>
         /// <param name="fillHeight">Height of box to fill.</param>
         /// <param name="cropWhitespace">Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.</param>
-        /// <param name="addPlayedIndicator">Optional. Add a played indicator.</param>
         /// <param name="blur">Optional. Blur image.</param>
         /// <param name="backgroundColor">Optional. Apply a background color for transparent images.</param>
         /// <param name="foregroundLayer">Optional. Apply a foreground layer on top of the image.</param>
@@ -1120,7 +1098,6 @@ namespace Jellyfin.Api.Controllers
             [FromQuery] int? fillWidth,
             [FromQuery] int? fillHeight,
             [FromQuery, ParameterObsolete] bool? cropWhitespace,
-            [FromQuery] bool? addPlayedIndicator,
             [FromQuery] int? blur,
             [FromQuery] string? backgroundColor,
             [FromQuery] string? foregroundLayer)
@@ -1146,7 +1123,6 @@ namespace Jellyfin.Api.Controllers
                     quality,
                     fillWidth,
                     fillHeight,
-                    addPlayedIndicator,
                     blur,
                     backgroundColor,
                     foregroundLayer,
@@ -1171,7 +1147,6 @@ namespace Jellyfin.Api.Controllers
         /// <param name="fillWidth">Width of box to fill.</param>
         /// <param name="fillHeight">Height of box to fill.</param>
         /// <param name="cropWhitespace">Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.</param>
-        /// <param name="addPlayedIndicator">Optional. Add a played indicator.</param>
         /// <param name="blur">Optional. Blur image.</param>
         /// <param name="backgroundColor">Optional. Apply a background color for transparent images.</param>
         /// <param name="foregroundLayer">Optional. Apply a foreground layer on top of the image.</param>
@@ -1202,7 +1177,6 @@ namespace Jellyfin.Api.Controllers
             [FromQuery] int? fillWidth,
             [FromQuery] int? fillHeight,
             [FromQuery, ParameterObsolete] bool? cropWhitespace,
-            [FromQuery] bool? addPlayedIndicator,
             [FromQuery] int? blur,
             [FromQuery] string? backgroundColor,
             [FromQuery] string? foregroundLayer,
@@ -1229,7 +1203,6 @@ namespace Jellyfin.Api.Controllers
                     quality,
                     fillWidth,
                     fillHeight,
-                    addPlayedIndicator,
                     blur,
                     backgroundColor,
                     foregroundLayer,
@@ -1255,7 +1228,6 @@ namespace Jellyfin.Api.Controllers
         /// <param name="fillWidth">Width of box to fill.</param>
         /// <param name="fillHeight">Height of box to fill.</param>
         /// <param name="cropWhitespace">Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.</param>
-        /// <param name="addPlayedIndicator">Optional. Add a played indicator.</param>
         /// <param name="blur">Optional. Blur image.</param>
         /// <param name="backgroundColor">Optional. Apply a background color for transparent images.</param>
         /// <param name="foregroundLayer">Optional. Apply a foreground layer on top of the image.</param>
@@ -1286,7 +1258,6 @@ namespace Jellyfin.Api.Controllers
             [FromQuery] int? fillWidth,
             [FromQuery] int? fillHeight,
             [FromQuery, ParameterObsolete] bool? cropWhitespace,
-            [FromQuery] bool? addPlayedIndicator,
             [FromQuery] int? blur,
             [FromQuery] string? backgroundColor,
             [FromQuery] string? foregroundLayer)
@@ -1312,7 +1283,6 @@ namespace Jellyfin.Api.Controllers
                     quality,
                     fillWidth,
                     fillHeight,
-                    addPlayedIndicator,
                     blur,
                     backgroundColor,
                     foregroundLayer,
@@ -1337,7 +1307,6 @@ namespace Jellyfin.Api.Controllers
         /// <param name="fillWidth">Width of box to fill.</param>
         /// <param name="fillHeight">Height of box to fill.</param>
         /// <param name="cropWhitespace">Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.</param>
-        /// <param name="addPlayedIndicator">Optional. Add a played indicator.</param>
         /// <param name="blur">Optional. Blur image.</param>
         /// <param name="backgroundColor">Optional. Apply a background color for transparent images.</param>
         /// <param name="foregroundLayer">Optional. Apply a foreground layer on top of the image.</param>
@@ -1368,7 +1337,6 @@ namespace Jellyfin.Api.Controllers
             [FromQuery] int? fillWidth,
             [FromQuery] int? fillHeight,
             [FromQuery, ParameterObsolete] bool? cropWhitespace,
-            [FromQuery] bool? addPlayedIndicator,
             [FromQuery] int? blur,
             [FromQuery] string? backgroundColor,
             [FromQuery] string? foregroundLayer,
@@ -1395,7 +1363,6 @@ namespace Jellyfin.Api.Controllers
                     quality,
                     fillWidth,
                     fillHeight,
-                    addPlayedIndicator,
                     blur,
                     backgroundColor,
                     foregroundLayer,
@@ -1421,7 +1388,6 @@ namespace Jellyfin.Api.Controllers
         /// <param name="fillWidth">Width of box to fill.</param>
         /// <param name="fillHeight">Height of box to fill.</param>
         /// <param name="cropWhitespace">Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.</param>
-        /// <param name="addPlayedIndicator">Optional. Add a played indicator.</param>
         /// <param name="blur">Optional. Blur image.</param>
         /// <param name="backgroundColor">Optional. Apply a background color for transparent images.</param>
         /// <param name="foregroundLayer">Optional. Apply a foreground layer on top of the image.</param>
@@ -1452,7 +1418,6 @@ namespace Jellyfin.Api.Controllers
             [FromQuery] int? fillWidth,
             [FromQuery] int? fillHeight,
             [FromQuery, ParameterObsolete] bool? cropWhitespace,
-            [FromQuery] bool? addPlayedIndicator,
             [FromQuery] int? blur,
             [FromQuery] string? backgroundColor,
             [FromQuery] string? foregroundLayer)
@@ -1478,7 +1443,6 @@ namespace Jellyfin.Api.Controllers
                     quality,
                     fillWidth,
                     fillHeight,
-                    addPlayedIndicator,
                     blur,
                     backgroundColor,
                     foregroundLayer,
@@ -1503,7 +1467,6 @@ namespace Jellyfin.Api.Controllers
         /// <param name="fillWidth">Width of box to fill.</param>
         /// <param name="fillHeight">Height of box to fill.</param>
         /// <param name="cropWhitespace">Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.</param>
-        /// <param name="addPlayedIndicator">Optional. Add a played indicator.</param>
         /// <param name="blur">Optional. Blur image.</param>
         /// <param name="backgroundColor">Optional. Apply a background color for transparent images.</param>
         /// <param name="foregroundLayer">Optional. Apply a foreground layer on top of the image.</param>
@@ -1534,7 +1497,6 @@ namespace Jellyfin.Api.Controllers
             [FromQuery] int? fillWidth,
             [FromQuery] int? fillHeight,
             [FromQuery, ParameterObsolete] bool? cropWhitespace,
-            [FromQuery] bool? addPlayedIndicator,
             [FromQuery] int? blur,
             [FromQuery] string? backgroundColor,
             [FromQuery] string? foregroundLayer,
@@ -1578,7 +1540,6 @@ namespace Jellyfin.Api.Controllers
                     quality,
                     fillWidth,
                     fillHeight,
-                    addPlayedIndicator,
                     blur,
                     backgroundColor,
                     foregroundLayer,
@@ -1605,7 +1566,6 @@ namespace Jellyfin.Api.Controllers
         /// <param name="fillWidth">Width of box to fill.</param>
         /// <param name="fillHeight">Height of box to fill.</param>
         /// <param name="cropWhitespace">Optional. Specify if whitespace should be cropped out of the image. True/False. If unspecified, whitespace will be cropped from logos and clear art.</param>
-        /// <param name="addPlayedIndicator">Optional. Add a played indicator.</param>
         /// <param name="blur">Optional. Blur image.</param>
         /// <param name="backgroundColor">Optional. Apply a background color for transparent images.</param>
         /// <param name="foregroundLayer">Optional. Apply a foreground layer on top of the image.</param>
@@ -1636,7 +1596,6 @@ namespace Jellyfin.Api.Controllers
             [FromQuery] int? fillWidth,
             [FromQuery] int? fillHeight,
             [FromQuery, ParameterObsolete] bool? cropWhitespace,
-            [FromQuery] bool? addPlayedIndicator,
             [FromQuery] int? blur,
             [FromQuery] string? backgroundColor,
             [FromQuery] string? foregroundLayer)
@@ -1679,7 +1638,6 @@ namespace Jellyfin.Api.Controllers
                     quality,
                     fillWidth,
                     fillHeight,
-                    addPlayedIndicator,
                     blur,
                     backgroundColor,
                     foregroundLayer,
@@ -1924,7 +1882,6 @@ namespace Jellyfin.Api.Controllers
             int? quality,
             int? fillWidth,
             int? fillHeight,
-            bool? addPlayedIndicator,
             int? blur,
             string? backgroundColor,
             string? foregroundLayer,
@@ -1940,7 +1897,6 @@ namespace Jellyfin.Api.Controllers
                 else if (percentPlayed.Value >= 100)
                 {
                     percentPlayed = null;
-                    addPlayedIndicator = true;
                 }
             }
 
@@ -1997,7 +1953,6 @@ namespace Jellyfin.Api.Controllers
                 FillWidth = fillWidth,
                 Quality = quality ?? 100,
                 Width = width,
-                AddPlayedIndicator = addPlayedIndicator ?? false,
                 PercentPlayed = percentPlayed ?? 0,
                 UnplayedCount = unplayedCount,
                 Blur = blur,

+ 0 - 3
MediaBrowser.Controller/Drawing/ImageProcessingOptions.cs

@@ -42,8 +42,6 @@ namespace MediaBrowser.Controller.Drawing
 
         public IReadOnlyCollection<ImageFormat> SupportedOutputFormats { get; set; }
 
-        public bool AddPlayedIndicator { get; set; }
-
         public int? UnplayedCount { get; set; }
 
         public int? Blur { get; set; }
@@ -111,7 +109,6 @@ namespace MediaBrowser.Controller.Drawing
         {
             return (Quality >= 90) &&
                 IsFormatSupported(originalImagePath) &&
-                !AddPlayedIndicator &&
                 PercentPlayed.Equals(0) &&
                 !UnplayedCount.HasValue &&
                 !Blur.HasValue &&

+ 0 - 111
MediaBrowser.Model/Dto/ImageOptions.cs

@@ -1,111 +0,0 @@
-#nullable disable
-using MediaBrowser.Model.Drawing;
-using MediaBrowser.Model.Entities;
-
-namespace MediaBrowser.Model.Dto
-{
-    /// <summary>
-    /// Class ImageOptions.
-    /// </summary>
-    public class ImageOptions
-    {
-        /// <summary>
-        /// Initializes a new instance of the <see cref="ImageOptions" /> class.
-        /// </summary>
-        public ImageOptions()
-        {
-            EnableImageEnhancers = true;
-        }
-
-        /// <summary>
-        /// Gets or sets the type of the image.
-        /// </summary>
-        /// <value>The type of the image.</value>
-        public ImageType ImageType { get; set; }
-
-        /// <summary>
-        /// Gets or sets the index of the image.
-        /// </summary>
-        /// <value>The index of the image.</value>
-        public int? ImageIndex { get; set; }
-
-        /// <summary>
-        /// Gets or sets the width.
-        /// </summary>
-        /// <value>The width.</value>
-        public int? Width { get; set; }
-
-        /// <summary>
-        /// Gets or sets the height.
-        /// </summary>
-        /// <value>The height.</value>
-        public int? Height { get; set; }
-
-        /// <summary>
-        /// Gets or sets the width of the max.
-        /// </summary>
-        /// <value>The width of the max.</value>
-        public int? MaxWidth { get; set; }
-
-        /// <summary>
-        /// Gets or sets the height of the max.
-        /// </summary>
-        /// <value>The height of the max.</value>
-        public int? MaxHeight { get; set; }
-
-        /// <summary>
-        /// Gets or sets the quality.
-        /// </summary>
-        /// <value>The quality.</value>
-        public int? Quality { get; set; }
-
-        /// <summary>
-        /// Gets or sets the image tag.
-        /// If set this will result in strong, unconditional response caching.
-        /// </summary>
-        /// <value>The hash.</value>
-        public string Tag { get; set; }
-
-        /// <summary>
-        /// Gets or sets a value indicating whether [crop whitespace].
-        /// </summary>
-        /// <value><c>null</c> if [crop whitespace] contains no value, <c>true</c> if [crop whitespace]; otherwise, <c>false</c>.</value>
-        public bool? CropWhitespace { get; set; }
-
-        /// <summary>
-        /// Gets or sets a value indicating whether [enable image enhancers].
-        /// </summary>
-        /// <value><c>true</c> if [enable image enhancers]; otherwise, <c>false</c>.</value>
-        public bool EnableImageEnhancers { get; set; }
-
-        /// <summary>
-        /// Gets or sets the format.
-        /// </summary>
-        /// <value>The format.</value>
-        public ImageFormat? Format { get; set; }
-
-        /// <summary>
-        /// Gets or sets a value indicating whether [add played indicator].
-        /// </summary>
-        /// <value><c>true</c> if [add played indicator]; otherwise, <c>false</c>.</value>
-        public bool AddPlayedIndicator { get; set; }
-
-        /// <summary>
-        /// Gets or sets the percent played.
-        /// </summary>
-        /// <value>The percent played.</value>
-        public int? PercentPlayed { get; set; }
-
-        /// <summary>
-        /// Gets or sets the un played count.
-        /// </summary>
-        /// <value>The un played count.</value>
-        public int? UnPlayedCount { get; set; }
-
-        /// <summary>
-        /// Gets or sets the color of the background.
-        /// </summary>
-        /// <value>The color of the background.</value>
-        public string BackgroundColor { get; set; }
-    }
-}

+ 0 - 47
src/Jellyfin.Drawing.Skia/PlayedIndicatorDrawer.cs

@@ -1,47 +0,0 @@
-using MediaBrowser.Model.Drawing;
-using SkiaSharp;
-
-namespace Jellyfin.Drawing.Skia;
-
-/// <summary>
-/// Static helper class for drawing 'played' indicators.
-/// </summary>
-public static class PlayedIndicatorDrawer
-{
-    private const int OffsetFromTopRightCorner = 38;
-
-    /// <summary>
-    /// Draw a 'played' indicator in the top right corner of a canvas.
-    /// </summary>
-    /// <param name="canvas">The canvas to draw the indicator on.</param>
-    /// <param name="imageSize">
-    /// The dimensions of the image to draw the indicator on. The width is used to determine the x-position of the
-    /// indicator.
-    /// </param>
-    public static void DrawPlayedIndicator(SKCanvas canvas, ImageDimensions imageSize)
-    {
-        var x = imageSize.Width - OffsetFromTopRightCorner;
-
-        using var paint = new SKPaint
-        {
-            Color = SKColor.Parse("#CC00A4DC"),
-            Style = SKPaintStyle.Fill
-        };
-
-        canvas.DrawCircle(x, OffsetFromTopRightCorner, 20, paint);
-
-        paint.Color = new SKColor(255, 255, 255, 255);
-        paint.TextSize = 30;
-        paint.IsAntialias = true;
-
-        // or:
-        // var emojiChar = 0x1F680;
-        const string Text = "✔️";
-        var emojiChar = StringUtilities.GetUnicodeCharacterCode(Text, SKTextEncoding.Utf32);
-
-        // ask the font manager for a font with that character
-        paint.Typeface = SKFontManager.Default.MatchCharacter(emojiChar);
-
-        canvas.DrawText(Text, (float)x - 12, OffsetFromTopRightCorner + 12, paint);
-    }
-}

+ 2 - 6
src/Jellyfin.Drawing.Skia/SkiaEncoder.cs

@@ -399,7 +399,7 @@ public class SkiaEncoder : IImageEncoder
         var hasBackgroundColor = !string.IsNullOrWhiteSpace(options.BackgroundColor);
         var hasForegroundColor = !string.IsNullOrWhiteSpace(options.ForegroundLayer);
         var blur = options.Blur ?? 0;
-        var hasIndicator = options.AddPlayedIndicator || options.UnplayedCount.HasValue || !options.PercentPlayed.Equals(0);
+        var hasIndicator = options.UnplayedCount.HasValue || !options.PercentPlayed.Equals(0);
 
         using var bitmap = GetBitmap(inputPath, autoOrient, orientation);
         if (bitmap is null)
@@ -522,11 +522,7 @@ public class SkiaEncoder : IImageEncoder
         {
             var currentImageSize = new ImageDimensions(imageWidth, imageHeight);
 
-            if (options.AddPlayedIndicator)
-            {
-                PlayedIndicatorDrawer.DrawPlayedIndicator(canvas, currentImageSize);
-            }
-            else if (options.UnplayedCount.HasValue)
+            if (options.UnplayedCount.HasValue)
             {
                 UnplayedCountIndicator.DrawUnplayedCountIndicator(canvas, currentImageSize, options.UnplayedCount.Value);
             }

+ 0 - 9
src/Jellyfin.Drawing/ImageProcessor.cs

@@ -38,7 +38,6 @@ public sealed class ImageProcessor : IImageProcessor, IDisposable
     private readonly IFileSystem _fileSystem;
     private readonly IServerApplicationPaths _appPaths;
     private readonly IImageEncoder _imageEncoder;
-    private readonly IMediaEncoder _mediaEncoder;
 
     private readonly SemaphoreSlim _parallelEncodingLimit;
 
@@ -64,7 +63,6 @@ public sealed class ImageProcessor : IImageProcessor, IDisposable
         _logger = logger;
         _fileSystem = fileSystem;
         _imageEncoder = imageEncoder;
-        _mediaEncoder = mediaEncoder;
         _appPaths = appPaths;
 
         var semaphoreCount = config.Configuration.ParallelImageEncodingLimit;
@@ -202,7 +200,6 @@ public sealed class ImageProcessor : IImageProcessor, IDisposable
             quality,
             dateModified,
             outputFormat,
-            options.AddPlayedIndicator,
             options.PercentPlayed,
             options.UnplayedCount,
             options.Blur,
@@ -295,7 +292,6 @@ public sealed class ImageProcessor : IImageProcessor, IDisposable
         int quality,
         DateTime dateModified,
         ImageFormat format,
-        bool addPlayedIndicator,
         double percentPlayed,
         int? unwatchedCount,
         int? blur,
@@ -350,11 +346,6 @@ public sealed class ImageProcessor : IImageProcessor, IDisposable
             filename.Append(fillHeight.Value);
         }
 
-        if (addPlayedIndicator)
-        {
-            filename.Append(",pl=true");
-        }
-
         if (percentPlayed > 0)
         {
             filename.Append(",p=");