stefanpaduraru / playlist-randomizer

A small React app that makes use of Redux, React Router and Material UI
http://playlist-randomizer.com
48 stars 11 forks source link

My valid playlist ID is rejected by getPlaylistIdFromURL #24

Open Patashu opened 3 years ago

Patashu commented 3 years ago

I have a playlist PLGjbC8erRwFCnGKYmocQzpJ6xoXP-SNgO that fails to get past the 2nd regex.

Apparently the 2nd regex is more opinionated about the positions of -s/_s than matches reality (it expects the last - to be no closer to the end than 10 following \w characters, yet here it's 4 from the end).

You can get it to pass the first regex, but only if you have a very specifically crafted url -

https://www.youtube.com/playlist?list=PLGjbC8erRwFCnGKYmocQzpJ6xoXP-SNgO fails

youtu.be/playlist?list=PLGjbC8erRwFCnGKYmocQzpJ6xoXP-SNgO passes

After using the final URL everything works fine, so it's just this function that needs to be fixed. Thank you for the amazing website! It works so much better than youtube shuffle in every way.