[F] Fix next song

This commit is contained in:
2025-11-23 14:57:00 +08:00
parent 2febbea6ec
commit 2927243237
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -14,6 +14,7 @@ export const load: PageServerLoad = async ({ params, parent }) => {
result: structuredClone(result),
lrc: await getLyricsProcessed(result.songId),
song,
playlist: await user.data?.loc?.currentPlaylistId?.let(getPlaylist)
playlist: await user.data?.loc?.currentPlaylistId?.let(getPlaylist),
resultId: params.id
}
}
+1 -1
View File
@@ -102,7 +102,7 @@
const loc = data.user.data.loc
const playlist = data.playlist
// Check if this is the latest result for the current playlist session
const isCurrentResult = loc?.lastResultId === data.result._id
const isCurrentResult = loc?.lastResultId === data.resultId
// Compute next state immediately
if (playlist && loc && isCurrentResult) {