From 5bf747d24aed83855e1565b64d4a7c171552adb7 Mon Sep 17 00:00:00 2001 From: sparks-alec Date: Mon, 28 Oct 2024 05:41:37 -0400 Subject: [PATCH] add cue list filter --- plugins/eos/main.js | 15 +++++++++++++++ plugins/eos/template.ejs | 2 ++ 2 files changed, 17 insertions(+) diff --git a/plugins/eos/main.js b/plugins/eos/main.js index 57e01fb..f16b406 100644 --- a/plugins/eos/main.js +++ b/plugins/eos/main.js @@ -18,6 +18,19 @@ exports.config = { return msg.toString().includes('/eos/out'); }, }, + fields: [ + { + key: 'cueListFilter', + label: 'Q List', + type: 'numberinput', + value: '', + action(_device) { + const device = _device; + device.data.cueListFilter = device.fields.cueListFilter; + device.draw(); + }, + }, + ], }; exports.ready = function ready(_device) { @@ -26,6 +39,8 @@ exports.ready = function ready(_device) { device.templates = { cue: _.template(fs.readFileSync(path.join(__dirname, `cue.ejs`))), }; + device.data.cueListFilter = device.fields.cueListFilter; + device.send('/eos/get/cuelist/count'); device.send('/eos/get/version'); device.send('/eos/subscribe', [{ type: 'i', value: 1 }]); diff --git a/plugins/eos/template.ejs b/plugins/eos/template.ejs index 7b17967..ab6873e 100644 --- a/plugins/eos/template.ejs +++ b/plugins/eos/template.ejs @@ -4,6 +4,7 @@ <% for(var i in data.EOS.cueLists){ %> + <% if(data.cueListFilter == i || data.cueListFilter.length==0){ %>
List <%= i %>
@@ -38,5 +39,6 @@ <% } %>
+ <% } %> <% } %>