Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queue display crashes on long entries #184

Open
kousu opened this issue Dec 13, 2018 · 0 comments
Open

Queue display crashes on long entries #184

kousu opened this issue Dec 13, 2018 · 0 comments

Comments

@kousu
Copy link

kousu commented Dec 13, 2018

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:

capture d ecran le 2018-12-13 a 12 43 06

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:

msg.data.txt

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:

  1. Installing ympd and mpd and mpc and pointing them all at each other as necessary
  2. cat youtube-links.txt | mpc add
  3. mpc playlist and diff youtube-links.txt <(mpc playlist) to verify it loaded correctly
  4. View in ympd to see that the playlist does not load.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant