From 49642112542c339ccdbcd55f13cd950db37585f6 Mon Sep 17 00:00:00 2001 From: Seth Van Niekerk Date: Thu, 20 Nov 2025 14:05:02 -0500 Subject: [PATCH] add music parameter to enable/disable weather music on any endpoint --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index bc23672..0a37504 100644 --- a/index.js +++ b/index.js @@ -77,11 +77,13 @@ function buildWeatherUrl(latitude, longitude, settings) { return `${ws4kpBaseUrl}/?${ws4kpParams.toString()}`; } -// Basic stream endpoint (no music) +// Basic stream endpoint (with optional music parameter) app.get('/stream', (req, res) => { + const { music = 'false' } = req.query; + const useMusic = music === 'true'; const startTime = Date.now(); streamHandler(req, res, { - useMusic: false, + useMusic, musicPath: MUSIC_PATH, startTime });