diff --git a/CloudServer/server.js b/CloudServer/server.js index 0023401..5a19c08 100644 --- a/CloudServer/server.js +++ b/CloudServer/server.js @@ -115,6 +115,18 @@ app.get('/media/temp/:file', (req, res) => { sendBinaryFile(res, path.join(tempBroadcastDir, name)); }); +app.get('/media', (req, res) => { + res.json({ + success: true, + message: 'Use a concrete media path', + routes: [ + '/media/audio/general/:file', + '/media/audio/station/:file', + '/media/temp/:file' + ] + }); +}); + app.use(express.static(path.join(__dirname, 'public'))); app.set('view engine', 'ejs'); diff --git a/station_broadcast.lua b/station_broadcast.lua index b217250..c159c1b 100644 --- a/station_broadcast.lua +++ b/station_broadcast.lua @@ -708,6 +708,7 @@ local function playHqAudioItem(item) Utils.log("ERROR", "Failed to download stream audio: " .. tostring(err)) return end + Utils.log("INFO", "Downloaded stream audio: " .. tostring(#bytes) .. " bytes") payload = bytes if ext == "wav" then format = "wav" elseif ext == "mp3" then format = "mp3" @@ -730,7 +731,7 @@ local function playHqAudioItem(item) return controller.speakFileAll(payload, CONFIG.AUDIO_VOLUME) end end) - if ok and result ~= false then + if ok and result then called = true end end @@ -748,14 +749,14 @@ local function playHqAudioItem(item) return sp.speakFile(payload, CONFIG.AUDIO_VOLUME) end end) - if ok and result ~= false then + if ok and result then called = true end end end if not called then - Utils.log("ERROR", "HQ speaker API not available for format " .. format) + Utils.log("ERROR", "HQ speaker did not accept audio for format " .. format) return end