bulltrackers-module 1.0.749 → 1.0.750
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -62,11 +62,31 @@ class ManifestBuilder {
|
|
|
62
62
|
|
|
63
63
|
// 3. Topological Sort (calculates passes)
|
|
64
64
|
const sortedItems = Graph.topologicalSort(nodes, adjacency);
|
|
65
|
-
|
|
66
|
-
// 4. Hydrate Sorted List
|
|
65
|
+
|
|
66
|
+
// 4. Hydrate Sorted List & APPLY AUTO-STAGGERING
|
|
67
67
|
const finalManifest = sortedItems.map(item => {
|
|
68
68
|
const entry = manifestMap.get(item.id);
|
|
69
69
|
entry.pass = item.pass;
|
|
70
|
+
|
|
71
|
+
// [FIX] Auto-stagger schedules: If Pass > 0 and using default time (02:00), shift it.
|
|
72
|
+
if (entry.pass > 0) {
|
|
73
|
+
const scheduleTime = entry.schedule.time || '00:00';
|
|
74
|
+
|
|
75
|
+
// Only offset if it looks like the default 02:00 start (or you can force it for all)
|
|
76
|
+
if (scheduleTime === '02:00') {
|
|
77
|
+
const baseHour = 2;
|
|
78
|
+
const offsetMinutes = entry.pass * 15; // 15 minute gap per pass
|
|
79
|
+
|
|
80
|
+
const newHour = baseHour + Math.floor(offsetMinutes / 60);
|
|
81
|
+
const newMinute = offsetMinutes % 60;
|
|
82
|
+
|
|
83
|
+
const formattedTime = `${String(newHour).padStart(2, '0')}:${String(newMinute).padStart(2, '0')}`;
|
|
84
|
+
|
|
85
|
+
this._log('INFO', `Auto-scheduling ${entry.name} (Pass ${entry.pass}) to ${formattedTime}`);
|
|
86
|
+
entry.schedule.time = formattedTime;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
70
90
|
return entry;
|
|
71
91
|
});
|
|
72
92
|
|