[F] Fix next song
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user