fix: add status updates

This commit is contained in:
Mateusz Pstrucha committed 2021-11-30 09:16:04 +01:00
1 parent 9173e5b466
commit 5e402024b5
1 file changed
+3 -1
+3 -1
View File
@@ -18,13 +18,13 @@ function stream(track) {
queueCommand('change', [track.url])
player.play()
queueCommand('volume', [defaultVolume])
updateStatus(track.tid, 0, track.duration, false)
}
function local(track) {
queueCommand('local', [`./cache/${track.tid}.mp4`])
player.play()
queueCommand('volume', [defaultVolume])
updateStatus(track.tid, 0, track.duration, false)
}
function parse(tracks) {
@@ -121,6 +121,7 @@ export default async function standalone() {
logAction(` ╔ « Playing »`)
logTrack(track)
local(track)
updateNext(_tracks[n + 1]?.tid ?? null)
}, starts.to() * 1e3)
}
@@ -131,6 +132,7 @@ export default async function standalone() {
setTimeout(() => {
logAction(`» End of #${przerwa} «`)
player.fadeOut(6)
updateStatus(null, null, null, true)
}, end.to() * 1e3)
}