Remove Collection and Playlist cleanup task

This commit is contained in:
Shadowghost
2026-02-07 09:37:13 +01:00
parent 98d7c8d59f
commit f5d966fcc3
4 changed files with 26 additions and 160 deletions

View File

@@ -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
}
}
}