From f4d6f3059865719683c0ccf65833103498ad3239 Mon Sep 17 00:00:00 2001 From: John A Knight Jr Date: Fri, 8 Nov 2024 13:27:25 -0800 Subject: [PATCH] Internal ID changed, missed the upgrade script. Fix #117 --- buildStripDefs.js | 2 +- package.json | 2 +- upgrades.js | 26 ++++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/buildStripDefs.js b/buildStripDefs.js index d006bc1..0059a0b 100644 --- a/buildStripDefs.js +++ b/buildStripDefs.js @@ -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, diff --git a/package.json b/package.json index fa1566d..67400b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "behringer-xair", - "version": "2.6.1", + "version": "2.6.2", "type": "module", "main": "index.js", "scripts": { diff --git a/upgrades.js b/upgrades.js index 7f9b1ba..6f4e8fe 100644 --- a/upgrades.js +++ b/upgrades.js @@ -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 + }, ]