panic: invalid uri: spotify:track:undefined
Closed this issue · 1 comments
lnkpaulo commented
Sending play request to http://localhost:3678/player/play where payload: uri='spotify:track:undefined' skip_to_uri=None paused=False gives:
panic: invalid uri: spotify:track:undefined
goroutine 60 [running]:
github.com/devgianlu/go-librespot.SpotifyIdFromUri(...)
/src/ids.go:114
main.(*AppPlayer).loadCurrentTrack(0xc0000e4800, 0x0, 0x1)
/src/cmd/daemon/controls.go:199 +0xda5
main.(*AppPlayer).loadContext(0xc0000e4800, 0xc0002d7800, 0x0, 0x0, 0x1)
/src/cmd/daemon/controls.go:189 +0x60e
main.(*AppPlayer).handleApiRequest(0xc0000e4800, {{0xacfb1e, 0x4}, {0xa462e0, 0xc000580450}, 0xc00061d320})
/src/cmd/daemon/player.go:488 +0x708
main.(*AppPlayer).Run(0xc0000e4800, 0xc00003dc20)
/src/cmd/daemon/player.go:578 +0x71a
created by main.(*App).withAppPlayer in goroutine 1
/src/cmd/daemon/main.go:245 +0x2f1
basically the above happens when uri='spotify:track:undefined' .
devgianlu commented
Thank you for reporting. I have made it so that go-librespot
will not panic.