1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-22 21:13:18 +00:00

updated ytdl-core

This commit is contained in:
MatteZ02 2020-05-08 10:35:48 +03:00
parent e3e70510b9
commit 8810b6c01c
3 changed files with 11 additions and 10 deletions

View File

@ -27,7 +27,7 @@
"dotenv": "^8.2.0",
"erlpack": "github:discordapp/erlpack",
"express": "^4.17.1",
"firebase": "^7.14.2",
"firebase": "^7.14.3",
"firebase-admin": "^8.12.0",
"fs": "0.0.1-security",
"genius-lyrics-api": "^2.0.3",
@ -43,7 +43,7 @@
"utf-8-validate": "^5.0.2",
"video-thumbnail-url": "^1.0.1",
"yt-search": "^1.1.2",
"ytdl-core": "^2.1.1",
"ytdl-core": "^2.1.2",
"zlib-sync": "^0.1.6"
}
}

View File

@ -1,5 +1,9 @@
module.exports = {
ytdlOptions: { filter: "audio", highWaterMark: 1 << 25, volume: false },
ytdlOptions: {
filter: "audio",
highWaterMark: 1 << 25,
volume: false,
},
options: {
seek: null,
bitrate: 1024,

View File

@ -15,13 +15,10 @@ module.exports = async function (guild, song, client, seek, play) {
streamConfig.options.seek = seek;
if (!song.url) {
queue.songs.shift();
song = queue.songs[0]
}
let input = song.url;
if (song.type === "ytdl") input = ytdl(song.url, streamConfig.ytdlOptions);
if (song.type === "ytdl") input = ytdl(song.url, streamConfig.ytdlOptions)
//.on('info', (info, format) => console.log(format))
.on('error', err => console.log(err));
const ffmpegArgs = [
"-analyzeduration",