Add logging to debug active download identification and speed
Some checks failed
Some checks failed
This commit is contained in:
@@ -62,8 +62,12 @@ class SABnzbdClient extends DownloadClient {
|
||||
const activeSlot = queueData.queue.slots.find(slot => slot.status === 'Downloading');
|
||||
const activeSpeed = activeSlot && clientStatus ? (clientStatus.kbpersec ? clientStatus.kbpersec * 1024 : 0) : 0;
|
||||
|
||||
logToFile(`[SABnzbd:${this.name}] Active slot: ${activeSlot ? activeSlot.nzo_id : 'none'}, Speed: ${activeSpeed}, Client status: ${clientStatus ? JSON.stringify({ kbpersec: clientStatus.kbpersec }) : 'none'}`);
|
||||
|
||||
for (const slot of queueData.queue.slots) {
|
||||
downloads.push(this.normalizeDownload(slot, 'queue', activeSlot === slot ? activeSpeed : 0));
|
||||
const slotSpeed = activeSlot === slot ? activeSpeed : 0;
|
||||
logToFile(`[SABnzbd:${this.name}] Slot ${slot.nzo_id} status ${slot.status}, speed ${slotSpeed}`);
|
||||
downloads.push(this.normalizeDownload(slot, 'queue', slotSpeed));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user