Closed SteeledSlagle13 closed 4 years ago
if u have discord i can invite u to my test server to show u
Can you share your minimum code for discord bot with the command to play song and get playlist? (Don't forget to remove any sensitive data like discord token)
ye :D ill get that up here in a bit
are u on windows?
Yes, but i also have VPS running on Ubuntu, if i can't reproduce it in my system, i will try to host it on my VPS.
okie dokie ill remove the part with ffmpeg location instead of worrying about that
hey u cool if i email it to u?
Sure, me@vincentjonathan.com
just sent email with code and steps lmk if you have questions!!!
Try update to 1.2.5 (alpha), npm i scrape-yt@1.2.5
and try again.
okie dokie give me like two minutes XD
Oh nvm it didn't fixed it lol, i thought it did! I will take a look again on what causes it.
XD hahahah sounds good im on 1.2.5 now and no dice I'll keep checking back here i appreciate you!
This seems like a performance issue from the scraper (cheerio). I'm still looking for a lighter alternative to try.
oof sounds good im not in a hurry for the fix i just wanted to bring it up thank you so much for looking into it i really appreciate it
Np! One easy temporary solution that i can think of is just make a local HTTP server as an API to get youtube data using my library, so instead of using scrape-yt
directly on the discord code, you just send a HTTP request to that local server so the scraper isn't hogging the discord node js thread.
oh thats an idea i can look into that :D
hey just to let you know.... i tried the node server... that works very nicely!!!! thank you very much
I've added worker thread support which allows the lib to run the scraper in parallel. Tried it on my VPS and seems like it fixed the issue. It's not really a performance improvement, but still 😬. Update not yet published on npm.
Published on npm (@1.3.2). You just need to add options on the second parameter and add useWorkerThread: true
import scrapeYt from "scrape-yt";
// Changed from -> import { scrapeYt } from "scrape-yt";
scrapeYt.getPlaylist("PLx65qkgCWNJIgVrndMrhsedBz1VDp0kfm", { useWorkerThread: true }).then(playlist => {
console.log(playlist);
});
dang thats awesome!!!! thank you so much ill get this implemented this week 😀
Describe the bug Hey so I'm seeing when I call
Where playlistMatch[1] =
PLqFSI8ggBE67YFjGyLykEqeh0c37uC8fi
My audio playing on discord has a gap when this is called
To Reproduce
Expected behavior No gap in audio when calling this method
Screenshots N/A
Additional context
sorry for opening so many issue man :/
i tried separating the call into a diff method that isnt connected to the player and calling the getPlaylist function while the something is playing and got the same issue.... I dont see the issue with getVideo() and im not seeing it with the search as well