Browse Source

Never replace BoxSet LinkedChildren on update (#14723)

Tim Eisele 5 ngày trước cách đây
mục cha
commit
580db0c1d2
1 tập tin đã thay đổi với 2 bổ sung8 xóa
  1. 2 8
      MediaBrowser.Providers/BoxSets/BoxSetMetadataService.cs

+ 2 - 8
MediaBrowser.Providers/BoxSets/BoxSetMetadataService.cs

@@ -69,14 +69,8 @@ public class BoxSetMetadataService : MetadataService<BoxSet, BoxSetInfo>
 
         if (mergeMetadataSettings)
         {
-            if (replaceData || targetItem.LinkedChildren.Length == 0)
-            {
-                targetItem.LinkedChildren = sourceItem.LinkedChildren;
-            }
-            else
-            {
-                targetItem.LinkedChildren = sourceItem.LinkedChildren.Concat(targetItem.LinkedChildren).Distinct().ToArray();
-            }
+            // 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
+            targetItem.LinkedChildren = sourceItem.LinkedChildren.Concat(targetItem.LinkedChildren).DistinctBy(i => i.Path).ToArray();
         }
     }