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:
@@ -811,9 +811,9 @@
|
||||
|
||||
<!-- Hidden Inputs -->
|
||||
<input type="file" id="upload-config" accept=".txt" onchange="performUpload('listFile', '/api/upload/list', this)">
|
||||
<input type="file" id="upload-general" multiple accept=".wav"
|
||||
<input type="file" id="upload-general" multiple accept=".wav,.mp3,.ogg,.flac,.m4a,.aac,.opus,.dfpwm"
|
||||
onchange="performUpload('generalAudioFiles', '/api/upload/general-audio', this)">
|
||||
<input type="file" id="upload-station" multiple accept=".wav"
|
||||
<input type="file" id="upload-station" multiple accept=".wav,.mp3,.ogg,.flac,.m4a,.aac,.opus,.dfpwm"
|
||||
onchange="performUpload('stationAudioFiles', '/api/upload/station-audio', this)">
|
||||
|
||||
<!-- Preview Modal -->
|
||||
@@ -1322,7 +1322,7 @@
|
||||
} catch (e) {
|
||||
content.innerHTML = `<div style="color:var(--danger)">Failed to load content</div>`;
|
||||
}
|
||||
} else if (file.name.endsWith('.wav')) {
|
||||
} else if (/\.(wav|mp3|ogg|flac|m4a|aac|opus)$/i.test(file.name)) {
|
||||
saveBtn.style.display = 'none';
|
||||
content.innerHTML = `
|
||||
<div class="audio-player">
|
||||
|
||||
Reference in New Issue
Block a user