Skip to content

Commit

Permalink
Merge pull request #119 from istnv/wip/scope
Browse files Browse the repository at this point in the history
Restore lost collection of sub-cue information
  • Loading branch information
istnv authored Mar 12, 2024
2 parents dd212a1 + 6f412a8 commit 9a04d9f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "figure53-qlab-advance",
"version": "2.6.2",
"version": "2.6.3",
"main": "qlabfb.js",
"type": "module",
"scripts": {
Expand Down
19 changes: 12 additions & 7 deletions qlabfb.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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':
Expand Down

0 comments on commit 9a04d9f

Please sign in to comment.