Adding some logging

This commit is contained in:
Violet Caulfield
2025-01-09 09:51:51 -06:00
parent 0a550005d6
commit ea8766239f

View File

@@ -55,13 +55,15 @@ export async function handlePlaybackStarted(sessionId: string, playstateApi: Pla
export async function handlePlaybackProgressUpdated(sessionId: string, playstateApi: PlaystateApi, track: JellifyTrack, progress: Progress) {
if (progress.duration - progress.position === 5)
if (progress.duration - progress.position === 5) {
console.debug("Track finished, scrobbling...");
await playstateApi.reportPlaybackStopped({
playbackStopInfo: {
SessionId: sessionId,
ItemId: track.ItemId
}
})
}
else
return
return;
}