sedmelluq / lavaplayer

Audio player library for Discord
Apache License 2.0
967 stars 247 forks source link

Invalid YouTube playlist and valid video returns empty playlist #584

Open klegul opened 3 years ago

klegul commented 3 years ago

What happens

When a YouTube link contains a valid video ID but an invalid playlist ID, lavaplayer returns an empty playlist. When I open this link in YouTube, the video loads normally and no playlist interface is displayed.

What should happen

I think lavaplayer should return a single audio track and ignore the playlist.

Environment

lavaplayer version: 1.3.71 Link for testing: https://www.youtube.com/watch?v=lX44CAz-JhU&list=invalid

MCOfficer commented 3 years ago

If a link contains a playlist, LP tries to load the playlist instead. Whether that should change is debatable.

klegul commented 3 years ago

If a link contains a playlist, LP tries to load the playlist instead. Whether that should change is debatable.

My reasoning for changing it is that users can play a YouTube video in their web browser and want to share it via a Discord bot, but then wonder why the bot won't play anything. It would just be more consistent in the user experience in my opinion.

Kw0rker commented 3 years ago

Same here. Like if user wants to share audio from the liked playlist, and it wont load anything

Kw0rker commented 3 years ago

@Gregyyy You can check for passed string if it contains "&list" option and then just cut the string