Skip to content

Commit 2379b2c

Browse files
committed
✨ feat: 点击下一首自动播放,优化 https问题
1 parent 8c6b69e commit 2379b2c

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/renderer/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
name="viewport"
88
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
99
/>
10+
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
1011

1112
<!-- SEO 元数据 -->
1213
<title>网抑云音乐 | AlgerKong | AlgerMusicPlayer</title>

src/renderer/store/modules/player.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -806,10 +806,6 @@ export const usePlayerStore = defineStore('player', () => {
806806
return;
807807
}
808808

809-
// 在切换前保存当前播放状态
810-
const shouldPlayNext = play.value;
811-
console.log('切换到下一首,当前播放状态:', shouldPlayNext ? '播放' : '暂停');
812-
813809
// 保存当前索引,用于错误恢复
814810
const currentIndex = playListIndex.value;
815811
let nowPlayListIndex: number;
@@ -841,7 +837,7 @@ export const usePlayerStore = defineStore('player', () => {
841837

842838
// 尝试播放,最多尝试maxRetries次
843839
while (!success && retryCount < maxRetries) {
844-
success = await handlePlayMusic(nextSong, shouldPlayNext);
840+
success = await handlePlayMusic(nextSong, true);
845841

846842
if (!success) {
847843
retryCount++;

0 commit comments

Comments
 (0)