From 45844cafecc09ea319469906f2fe3b11a3aecfaa Mon Sep 17 00:00:00 2001 From: redxef Date: Mon, 18 Nov 2024 20:59:20 +0100 Subject: [PATCH] fix: ToString call to avoid duplicates. --- .../ScheduledTasks/GeneratePlaylist.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jellyfin.Plugin.SmartPlaylist/ScheduledTasks/GeneratePlaylist.cs b/Jellyfin.Plugin.SmartPlaylist/ScheduledTasks/GeneratePlaylist.cs index bb0a7b2..5343abf 100644 --- a/Jellyfin.Plugin.SmartPlaylist/ScheduledTasks/GeneratePlaylist.cs +++ b/Jellyfin.Plugin.SmartPlaylist/ScheduledTasks/GeneratePlaylist.cs @@ -1,3 +1,4 @@ +using System.Globalization; using MediaBrowser.Model.Tasks; using Microsoft.Extensions.Logging; using MediaBrowser.Controller; @@ -172,7 +173,7 @@ namespace Jellyfin.Plugin.SmartPlaylist.ScheduledTasks { throw new ArgumentException(""); } var existingItems = playlist_new.GetManageableItems().ToList(); - await _playlistManager.RemoveItemFromPlaylistAsync(playlist.Id.ToString(), existingItems.Select(x => x.Item1.ItemId.ToString())); + await _playlistManager.RemoveItemFromPlaylistAsync(playlist.Id.ToString(), existingItems.Select(x => x.Item1.ItemId?.ToString("N", CultureInfo.InvariantCulture))); } } }