From 6f412a8d15ba2ecfa3646c8b5cc52dc4d5ca1aca Mon Sep 17 00:00:00 2001 From: John A Knight Jr Date: Mon, 11 Mar 2024 23:57:11 -0700 Subject: [PATCH] Restore lost collection of sub-cue information --- package.json | 2 +- qlabfb.js | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 1bd3436..4fd9e5b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "figure53-qlab-advance", - "version": "2.6.2", + "version": "2.6.3", "main": "qlabfb.js", "type": "module", "scripts": { diff --git a/qlabfb.js b/qlabfb.js index c225c5c..5986ef8 100644 --- a/qlabfb.js +++ b/qlabfb.js @@ -729,8 +729,8 @@ class QLabInstance extends InstanceBase { if (Array.isArray(jCue)) { const idCount = {} const dupIds = false - for (let i = 0; i < jCue.length; i++) { - q = new Cue(jCue[i], this) + jCue.forEach((j, i) => { + q = new Cue(j, this) q.qOrder = i if (ql) { q.qList = ql @@ -761,8 +761,12 @@ class QLabInstance extends InstanceBase { } } } + if (j.cues.length) { + // next level cues + this.updateCues(j.cues) + } delete this.requestedCues[q.uniqueID] - } + }) this.checkFeedbacks(...this.fb2check) if (dupIds) { this.updateStatus(InstanceStatus.UnknownWarning, 'Multiple cues\nwith the same cue_id') @@ -1011,10 +1015,12 @@ class QLabInstance extends InstanceBase { } if ('error' == j.status) { - this.logError(j.address) - return // qlab 5.3+ returns an error when asked '/cue/active/valuesForKeys' // if no cue is active. + if (!(mn.slice(-1) == 'valuesForKeys')) { + this.logError(j.address) + } + return } switch ( mn.slice(-1)[0] // last segment of address @@ -1129,8 +1135,7 @@ class QLabInstance extends InstanceBase { this.updateCues(q, 'l') this.updateCues(q.cues, 'l', q.uniqueID) } - // QLab 5.3+ returns error if no que is active/playing - // this.sendOSC('/cue/active/valuesForKeys', qr) + this.sendOSC('/cue/active/valuesForKeys', qr) } break case 'children':