Rewrite tracks queue to accept both Tracks and Playlists object. Track selector will have to be refactored to resolve tracks appropriately. It will also fix #1821 in this way:
when playlist is found, extractor resolves a partial playlist (flag partial: true is set) immediately
discord-player queues up that partial playlist like any other playlist
audio player starts consuming tracks of that playlist one by one
while step 3 is happening, discord-player then runs a background task to fetch remaining tracks of that playlist
To the end user, everything happens instantly (user will not have to wait for like 10 seconds to load a playlist with around 500 tracks) while we are taking care of the things in background.
This approach comes with a breaking change though. To get around this issue, I propose another api to read tracks in the queue to not break the ecosystem in the future:
// this should return array of tracks
const tracks = queue.getTracks();
another interesting problem we have to face is removeTrack, moveTrack, jump, insert, etc...
Rewrite tracks queue to accept both
Track
s andPlaylist
s object. Track selector will have to be refactored to resolve tracks appropriately. It will also fix #1821 in this way:partial: true
is set) immediatelyTo the end user, everything happens instantly (user will not have to wait for like 10 seconds to load a playlist with around 500 tracks) while we are taking care of the things in background.
This approach comes with a breaking change though. To get around this issue, I propose another api to read tracks in the queue to not break the ecosystem in the future:
another interesting problem we have to face is
removeTrack
,moveTrack
,jump
,insert
, etc...Feel free to suggest your ideas on this.