Fix startPackages: scheduler now respects runPackageIds filter
findNextQueuedItem(), hasQueuedItems(), hasDelayedQueuedItems() and countQueuedItems() now skip packages not in runPackageIds when the set is non-empty. This ensures "Ausgewählte Downloads starten" only processes selected packages instead of all enabled ones. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
cab550a13c
commit
0888e16aec
@ -3537,6 +3537,9 @@ export class DownloadManager extends EventEmitter {
|
||||
if (!pkg || pkg.cancelled || !pkg.enabled) {
|
||||
continue;
|
||||
}
|
||||
if (this.runPackageIds.size > 0 && !this.runPackageIds.has(packageId)) {
|
||||
continue;
|
||||
}
|
||||
for (const itemId of pkg.itemIds) {
|
||||
const item = this.session.items[itemId];
|
||||
if (!item) {
|
||||
@ -3564,6 +3567,9 @@ export class DownloadManager extends EventEmitter {
|
||||
if (!pkg || pkg.cancelled || !pkg.enabled) {
|
||||
continue;
|
||||
}
|
||||
if (this.runPackageIds.size > 0 && !this.runPackageIds.has(packageId)) {
|
||||
continue;
|
||||
}
|
||||
for (const itemId of pkg.itemIds) {
|
||||
const item = this.session.items[itemId];
|
||||
if (!item) {
|
||||
@ -3598,6 +3604,9 @@ export class DownloadManager extends EventEmitter {
|
||||
if (!pkg || pkg.cancelled || !pkg.enabled) {
|
||||
continue;
|
||||
}
|
||||
if (this.runPackageIds.size > 0 && !this.runPackageIds.has(item.packageId)) {
|
||||
continue;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -3610,6 +3619,9 @@ export class DownloadManager extends EventEmitter {
|
||||
if (!pkg || pkg.cancelled || !pkg.enabled) {
|
||||
continue;
|
||||
}
|
||||
if (this.runPackageIds.size > 0 && !this.runPackageIds.has(packageId)) {
|
||||
continue;
|
||||
}
|
||||
for (const itemId of pkg.itemIds) {
|
||||
const item = this.session.items[itemId];
|
||||
if (!item) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user