Skip to content

Commit

Permalink
Merge pull request #118 from istnv/bug/mutegroupfb
Browse files Browse the repository at this point in the history
Internal ID changed, missed the upgrade script. Fix #117
  • Loading branch information
istnv authored Nov 8, 2024
2 parents 14a76e1 + f4d6f30 commit 99ac553
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion buildStripDefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ export function buildStripDefs(self) {
} else {
for (let c = theStrip.min; c <= theStrip.max; c++) {
let theID = chID + '/' + pad0(c, d) + muteSfx
let feedbackID = stripID + '_' + c
let feedbackID = unSlash(stripID) + '_' + c
fbToStat[feedbackID] = theID
stat[theID] = {
isOn: false,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "behringer-xair",
"version": "2.6.1",
"version": "2.6.2",
"type": "module",
"main": "index.js",
"scripts": {
Expand Down
26 changes: 26 additions & 0 deletions upgrades.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,30 @@ export const UpgradeScripts = [
}
return result
},

function (context, props) {
const result = {
updatedConfig: null,
updatedActions: [],
updatedFeedbacks: [],
}

for (let fb of props.feedbacks) {
let changed = false
if (fb.feedbackId == 'config/mute') {
fb.feedbackId = 'config_mute'
changed = true
}
if (fb.feedbackId == 'config_mute') {
if (fb.options.state == undefined) {
fb.options.state = '1'
changed = true
}
}
if (changed) {
result.updatedFeedbacks.push(fb)
}
}
return result
},
]

0 comments on commit 99ac553

Please sign in to comment.