Queue display crashes on long entries
kousu opened this issue · 0 comments
kousu commented
I added a huge youtube playlist to mpd thanks to youtube-dl
:
$ youtube-dl -gx "https://www.youtube.com/watch?v=m3lF2qEA2cw&list=PLd3udltX2Fih-fkvfbw0zENvao9bm8Awh" | \
tee youtube-links.txt | \
mpc add
I hear the tracks coming out, and mpc
and ncmpc
can both see and interact with the playlist, but ympd
doesn't show a playlist:
Looking at the console, I see it's crashing in socket.onmessage
:
https://github.com/notandy/ympd/blob/master/htdocs/js/mpd.js#L214-L218
with:
SyntaxError: JSON.parse: bad control character in string literal at line 1 column 102400 of the JSON data
Here is the msg.data
that crashes:
Notably, there's some nulls that got embedded by (your?) JSON encoder.
Here's that list of streams (in case youtube takes down those videos/blocks youtube-dl again):
youtube-links.txt
You should be able to reproduce this by:
- Installing ympd and mpd and mpc and pointing them all at each other as necessary
cat youtube-links.txt | mpc add
mpc playlist
anddiff youtube-links.txt <(mpc playlist)
to verify it loaded correctly- View in ympd to see that the playlist does not load.