fredi-68 / Ram

ProtOS Discord Bot (Codename: Ram) DISCLAIMER: This repository is a mirror of my local network source control. Information may or may not be inaccurate. Updates only whenever I can be bothered.
0 stars 0 forks source link

Loading times for playlist meta data are too long #37

Open fredi-68 opened 5 years ago

fredi-68 commented 5 years ago

When queueing playlists, YTDL analyzes the playlist, then proceeds to download all meta data for EACH entry before returning the list of results to us. This is however not really what we want. Ideally we'd request an analysis on the source first to get a list of targets. Then we'd iterate over this list, download the meta data for each entry and immediately download and queue the song, then move on to the next entry. This way we can start playing after a couple seconds even if the playlist contains 50+ entries. The songs will keep analyzing and queuing in the background (this is already handled by the audio engine).

Things to do are figuring out a way to stop YTDL from extracting the target URI immediately, then add another step where we manually get the URI when we actually queue the track. More docs reading. Yay.