SuspiciousLookingOwl / youtubei

Get Youtube data such as videos, playlists, channels, video information & comments, related videos, up next video, and more!
https://suspiciouslookingowl.github.io/youtubei
MIT License
241 stars 50 forks source link

[BUG] TypeError: playlist.next is not a function #45

Closed MontiKasta closed 2 years ago

MontiKasta commented 2 years ago

Describe the bug

The playlist.next() function does not work in Youtube's own artist mixes and gives this error (TypeError: playlist.next is not a function) . As far as I understand, Youtube's artist mixes have 20-25 songs. However, the .next() function, which can be used even if the number of songs in the normal playlist is below 100 and does not give an error, results in an error in Youtube's mixes.

Expected behavior

I want playlist.next() to work on Youtube mixes (If the number of songs is less than 100 it should not give an error and if it is above 100 it should work.)

Additional context

People who don't want a problem until the bug is fixed they can use the code like :

if(playlist.channel) await playlist.next(0); (Youtube's own mixes don't have a channel infos .)

SuspiciousLookingOwl commented 2 years ago

I don't think adding .next() on Mix playlist is possible because AFAIK YouTube it self only serves 20-25 videos on mix playlists.

This issue is somewhat similar with https://github.com/SuspiciousLookingOwl/youtubei/issues/32, I will just close this one.