go-plex-client icon indicating copy to clipboard operation
go-plex-client copied to clipboard

convert message to json failed: json: cannot unmarshal string into Go struct field TranscodeSession.progress of type float64

Open Jille opened this issue 5 years ago • 0 comments

I'm getting this error when using the websockets.

convert message to json failed: json: cannot unmarshal string into Go struct field TranscodeSession.progress of type float64

This is what it chokes on:

{"NotificationContainer":{"type":"transcodeSession.end","size":1,"TranscodeSession":[{"key":"/transcode/sessions/f546195c58e8a52a-com-plexapp-android","throttled":true,"complete":false,"progress":"27.5","speed":"0","duration":2665119,"remaining":13519,"context":"streaming","sourceVideoCodec":"mpeg4","sourceAudioCodec":"mp3","videoDecision":"transcode","audioDecision":"copy","protocol":"hls","container":"mpegts","videoCodec":"h264","audioCodec":"mp3","audioChannels":2,"transcodeHwRequested":false,"timeStamp":"1569248610.8982544"}]}}

It doesn't seem to like Plex encoding integers as strings. (https://play.golang.org/p/NsXo0qlUMQw confirms that Go refuses to decode the string into an integer)

Jille avatar Sep 23 '19 14:09 Jille