mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-02 04:52:50 +08:00
feat: 双击播放队列中的歌曲(不清空队列)
- 新增 POST /api/player/:botId/play-at 端点,跳转到队列指定索引 - 使用 queue.playAt(index) + resolveAndPlay,保留队列完整 - Queue.vue 添加 @dblclick 处理,双击即播放对应歌曲 - 添加 store.playAtIndex() action Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
17991b936a
commit
d8c0911593
3 files changed
+41
No files matched your search
@@ -172,6 +172,13 @@ export const usePlayerStore = defineStore('player', {
|
||||
setTimeout(() => this.syncElapsed(), 500);
|
||||
},
|
||||
|
||||
async playAtIndex(index: number) {
|
||||
if (!this.activeBotId) return;
|
||||
await axios.post(`/api/player/${this.activeBotId}/play-at`, { index });
|
||||
this.serverElapsed = 0;
|
||||
this._syncAfterAction();
|
||||
},
|
||||
|
||||
async play(query: string, platform = 'netease') {
|
||||
if (!this.activeBotId) return;
|
||||
await axios.post(`/api/player/${this.activeBotId}/play`, { query, platform });
|
||||
|
||||
Reference in new issue
Block a user