aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-07-23 13:35:43 +0200
committerShadowghost <Ghost_of_Stone@web.de>2026-07-23 13:41:51 +0200
commitdc300fae53b6b42090341cb517238bbc76479e02 (patch)
treea7e5f9a72afd0a6fdb699f0a4da9babbf043158f /Emby.Server.Implementations
parent88216e0ec4adc388a1db795f18fa8f4591ebc099 (diff)
Allow duplicate LinkedChildren for Playlists
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/Playlists/PlaylistManager.cs15
1 files changed, 1 insertions, 14 deletions
diff --git a/Emby.Server.Implementations/Playlists/PlaylistManager.cs b/Emby.Server.Implementations/Playlists/PlaylistManager.cs
index 409414139c..308faed8cc 100644
--- a/Emby.Server.Implementations/Playlists/PlaylistManager.cs
+++ b/Emby.Server.Implementations/Playlists/PlaylistManager.cs
@@ -219,28 +219,15 @@ namespace Emby.Server.Implementations.Playlists
var playlist = _libraryManager.GetItemById(playlistId) as Playlist
?? throw new ArgumentException("No Playlist exists with Id " + playlistId);
- // Retrieve all the items to be added to the playlist
+ // Retrieve all the items to be added to the playlist.
var newItems = GetPlaylistItems(newItemIds, user, options)
.Where(i => i.SupportsAddingToPlaylist);
- // Filter out duplicate items
- var existingIds = playlist.LinkedChildren.Select(c => c.ItemId).ToHashSet();
- newItems = newItems
- .Where(i => !existingIds.Contains(i.Id))
- .Distinct();
-
// Create a list of the new linked children to add to the playlist
var childrenToAdd = newItems
.Select(LinkedChild.Create)
.ToList();
- // Log duplicates that have been ignored, if any
- int numDuplicates = newItemIds.Count - childrenToAdd.Count;
- if (numDuplicates > 0)
- {
- _logger.LogWarning("Ignored adding {DuplicateCount} duplicate items to playlist {PlaylistName}.", numDuplicates, playlist.Name);
- }
-
// Do nothing else if there are no items to add to the playlist
if (childrenToAdd.Count == 0)
{