Browse Source

getting started sorting in the dashboard

Luke Pulverenti 12 năm trước cách đây
mục cha
commit
8f7981b6a6
1 tập tin đã thay đổi với 10 bổ sung1 xóa
  1. 10 1
      MediaBrowser.Controller/Entities/Folder.cs

+ 10 - 1
MediaBrowser.Controller/Entities/Folder.cs

@@ -774,7 +774,16 @@ namespace MediaBrowser.Controller.Entities
                         progress.Report((90 * percent) + 10);
                     });
 
-                    await ((Folder)child).ValidateChildren(innerProgress, cancellationToken, recursive: recursive).ConfigureAwait(false);
+                    await ((Folder) child).ValidateChildren(innerProgress, cancellationToken, recursive).ConfigureAwait(false);
+                }
+                else
+                {
+                    percentages.TryUpdate(child.Id, 1, percentages[child.Id]);
+
+                    var percent = percentages.Values.Sum();
+                    percent /= list.Count;
+
+                    progress.Report((90 * percent) + 10);
                 }
             }));