aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Providers/BoxSets/BoxSetMetadataService.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-02-07 09:37:13 +0100
committerShadowghost <Ghost_of_Stone@web.de>2026-02-07 09:37:42 +0100
commitf5d966fcc3eb3c5f8aa39a22caa8cf615029e1c5 (patch)
tree72f8539cb0e95fada5293eb7fdbf1c8d52490595 /MediaBrowser.Providers/BoxSets/BoxSetMetadataService.cs
parent98d7c8d59fa3180e50ee311dfc53164325210896 (diff)
Remove Collection and Playlist cleanup task
Diffstat (limited to 'MediaBrowser.Providers/BoxSets/BoxSetMetadataService.cs')
-rw-r--r--MediaBrowser.Providers/BoxSets/BoxSetMetadataService.cs14
1 files changed, 10 insertions, 4 deletions
diff --git a/MediaBrowser.Providers/BoxSets/BoxSetMetadataService.cs b/MediaBrowser.Providers/BoxSets/BoxSetMetadataService.cs
index 3a872f687c..5f80151dd3 100644
--- a/MediaBrowser.Providers/BoxSets/BoxSetMetadataService.cs
+++ b/MediaBrowser.Providers/BoxSets/BoxSetMetadataService.cs
@@ -70,12 +70,18 @@ public class BoxSetMetadataService : MetadataService<BoxSet, BoxSetInfo>
if (mergeMetadataSettings)
{
- // TODO: Change to only replace when currently empty or requested. This is currently not done because the metadata service is not handling attaching collection items based on the provider responses
+ // Only merge LinkedChildren from metadata for external collections (not managed by Jellyfin).
+ // For internal collections, the database LinkedChildren table is the source of truth.
+ var targetPath = targetItem.Path;
+ if (!string.IsNullOrEmpty(targetPath)
+ && !FileSystem.ContainsSubPath(ServerConfigurationManager.ApplicationPaths.DataPath, targetPath))
+ {
#pragma warning disable CS0618 // Type or member is obsolete - fallback for legacy path-based dedup
- targetItem.LinkedChildren = sourceItem.LinkedChildren.Concat(targetItem.LinkedChildren)
- .DistinctBy(i => i.ItemId.HasValue && !i.ItemId.Value.Equals(Guid.Empty) ? i.ItemId.Value.ToString() : i.Path ?? string.Empty)
- .ToArray();
+ targetItem.LinkedChildren = sourceItem.LinkedChildren.Concat(targetItem.LinkedChildren)
+ .DistinctBy(i => i.ItemId.HasValue && !i.ItemId.Value.Equals(Guid.Empty) ? i.ItemId.Value.ToString() : i.Path ?? string.Empty)
+ .ToArray();
#pragma warning restore CS0618
+ }
}
}