feat: 点击下一首自动播放,优化 https问题

This commit is contained in:
alger
2025-05-17 20:10:07 +08:00
parent 8c6b69e762
commit 2379b2c9cc
2 changed files with 2 additions and 5 deletions

View File

@@ -7,6 +7,7 @@
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
<!-- SEO 元数据 -->
<title>网抑云音乐 | AlgerKong AlgerMusicPlayer</title>

View File

@@ -806,10 +806,6 @@ export const usePlayerStore = defineStore('player', () => {
return;
}
// 在切换前保存当前播放状态
const shouldPlayNext = play.value;
console.log('切换到下一首,当前播放状态:', shouldPlayNext ? '播放' : '暂停');
// 保存当前索引,用于错误恢复
const currentIndex = playListIndex.value;
let nowPlayListIndex: number;
@@ -841,7 +837,7 @@ export const usePlayerStore = defineStore('player', () => {
// 尝试播放最多尝试maxRetries次
while (!success && retryCount < maxRetries) {
success = await handlePlayMusic(nextSong, shouldPlayNext);
success = await handlePlayMusic(nextSong, true);
if (!success) {
retryCount++;