From 80d49d8997fe10aa37fee40928b778d85b9033be Mon Sep 17 00:00:00 2001 From: bakedpotatolord Date: Mon, 12 May 2025 12:46:46 -0600 Subject: [PATCH] remove file extention from device names --- app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index c40b3c7b..b42b158f 100644 --- a/app.js +++ b/app.js @@ -668,7 +668,10 @@ function generateDevices() { fs.readdirSync(root).forEach(type => { let map = devs[type] = devs[type] || {}; fs.readdirSync(PATH.join(root,type)).forEach(device => { - map[device] = JSON.parse(fs.readFileSync(PATH.join(root,type,device))); + let deviceName = device.endsWith('.json') + ? device.substring(0,device.length-5) + : device; + map[deviceName] = JSON.parse(fs.readFileSync(PATH.join(root,type,device))); }); }); synth.devices = `self.devices = ${JSON.stringify(devs)};`;