feat(console): split audio files into music and beep folders
Add an Audio/music path for uploaded music, keep the existing general audio directory as the Beep group, and update the console and music page so the file manager now shows Configuration, Music, Beep, and Station with matching upload and preview routes.
This commit is contained in:
@@ -180,7 +180,7 @@
|
||||
<span class="badge" id="track_badge">未选择</span>
|
||||
</div>
|
||||
|
||||
<label for="track_select">选择音乐(来自 /opt/CC-StationBroadcast/Audio/general)</label>
|
||||
<label for="track_select">选择音乐(来自 /opt/CC-StationBroadcast/Audio/music)</label>
|
||||
<div class="row" style="margin-top:0">
|
||||
<select id="track_select" onchange="onTrackChange()" style="flex:1; min-width: 200px;"></select>
|
||||
<button class="btn" onclick="loadTracks()">刷新</button>
|
||||
@@ -316,7 +316,7 @@
|
||||
if (tracks.length === 0) {
|
||||
sel.innerHTML = '<option value="">(无可用音频)</option>';
|
||||
onTrackChange();
|
||||
setStatus("没有可用音频(请上传到 /opt/CC-StationBroadcast/Audio/general)");
|
||||
setStatus("没有可用音频(请上传到 /opt/CC-StationBroadcast/Audio/music)");
|
||||
return;
|
||||
}
|
||||
sel.appendChild(new Option("请选择…", ""));
|
||||
@@ -339,7 +339,7 @@
|
||||
|
||||
setStatus(`正在上传 ${file.name}…`);
|
||||
try {
|
||||
const resp = await fetch("/api/upload/general-audio", {
|
||||
const resp = await fetch("/api/upload/music-audio", {
|
||||
method: "POST",
|
||||
body: formData
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user