feat(audio): support more upload and music formats

Allow the console and music page to upload common audio formats, expand music track detection and playback source selection beyond wav/dfpwm, and update station list name normalization so common extensions resolve consistently. Bump the station build to v1.0.6.
This commit is contained in:
2026-08-01 06:39:18 +08:00
parent 6610b168d7
commit 1554adf5f1
4 changed files with 57 additions and 29 deletions
+10 -2
View File
@@ -2,7 +2,7 @@
-- ============================================================================
-- 1. Configuration & Constants
-- ============================================================================
local APP_VERSION_TEXT = "v1.0.5"
local APP_VERSION_TEXT = "v1.0.6"
local CONFIG = {
CLOUD_URL = "ws://stabadmin.fse-media.group",
@@ -491,7 +491,15 @@ function Audio.loadStationList()
if codes and files then
local list = {}
for f in files:gmatch("[^,]+") do
local cleanName = f:match("^%s*(.-)%s*$"):gsub("%.wav$", ""):gsub("%.dfpwm$", "")
local cleanName = f:match("^%s*(.-)%s*$")
:gsub("%.[Ww][Aa][Vv]$", "")
:gsub("%.[Mm][Pp]3$", "")
:gsub("%.[Oo][Gg][Gg]$", "")
:gsub("%.[Ff][Ll][Aa][Cc]$", "")
:gsub("%.[Mm]4[Aa]$", "")
:gsub("%.[Aa][Aa][Cc]$", "")
:gsub("%.[Oo][Pp][Uu][Ss]$", "")
:gsub("%.[Dd][Ff][Pp][Ww][Mm]$", "")
if cleanName ~= "" then
table.insert(list, cleanName)
end