From 12d357081df3df46c693ab94ed23553eea2f409b Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Wed, 18 Jan 2023 22:02:59 -0600 Subject: [PATCH] fix eos updating when new cue lists added --- plugins/eos/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/eos/main.js b/plugins/eos/main.js index 2025e06..a8363cd 100644 --- a/plugins/eos/main.js +++ b/plugins/eos/main.js @@ -30,6 +30,7 @@ exports.ready = function ready(_device) { exports.data = function data(_device, osc) { const device = _device; + this.deviceInfoUpdate(device, 'status', 'ok'); const addressParts = osc.address.split('/'); addressParts.shift(); @@ -50,7 +51,10 @@ exports.data = function data(_device, osc) { device.send(`/eos/get/cue/${addressParts[4]}/index/${i}`); } } else if (match(addressParts, ['eos', 'out', 'get', 'cue', '*', '*', '*', 'list', '*', '*'])) { - this.deviceInfoUpdate(device, 'status', 'ok'); + if (device.data.EOS.cueLists[addressParts[4]] === undefined) { + device.data.EOS.cueLists[addressParts[4]] = {}; + device.send(`/eos/get/cue/${addressParts[4]}/count`); + } if (device.data.EOS.cueLists[addressParts[4]][addressParts[5]] === undefined) { device.data.EOS.cueLists[addressParts[4]][addressParts[5]] = {}; }