mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-06-27 09:12:43 +02:00
Revert "Reset playerclients for ytdl during getinfo to defaults"
This commit is contained in:
parent
b10650bc0e
commit
045362c22c
2 changed files with 4 additions and 8 deletions
|
@ -89,8 +89,8 @@
|
||||||
"@discordjs/opus": "^0.8.0",
|
"@discordjs/opus": "^0.8.0",
|
||||||
"@discordjs/rest": "1.0.1",
|
"@discordjs/rest": "1.0.1",
|
||||||
"@discordjs/voice": "0.17.0",
|
"@discordjs/voice": "0.17.0",
|
||||||
"@distube/ytdl-core": "^4.14.8",
|
"@distube/ytdl-core": "^4.14.4",
|
||||||
"@distube/ytsr": "^2.0.4",
|
"@distube/ytsr": "^2.0.0",
|
||||||
"@prisma/client": "4.16.0",
|
"@prisma/client": "4.16.0",
|
||||||
"@types/libsodium-wrappers": "^0.7.9",
|
"@types/libsodium-wrappers": "^0.7.9",
|
||||||
"array-shuffle": "^3.0.0",
|
"array-shuffle": "^3.0.0",
|
||||||
|
@ -121,7 +121,7 @@
|
||||||
"patch-package": "^8.0.0",
|
"patch-package": "^8.0.0",
|
||||||
"postinstall-postinstall": "^2.1.0",
|
"postinstall-postinstall": "^2.1.0",
|
||||||
"read-pkg": "7.1.0",
|
"read-pkg": "7.1.0",
|
||||||
"reflect-metadata": "^0.2.2",
|
"reflect-metadata": "^0.1.13",
|
||||||
"sponsorblock-api": "^0.2.4",
|
"sponsorblock-api": "^0.2.4",
|
||||||
"spotify-uri": "^3.0.2",
|
"spotify-uri": "^3.0.2",
|
||||||
"spotify-web-api-node": "^5.0.2",
|
"spotify-web-api-node": "^5.0.2",
|
||||||
|
|
|
@ -515,7 +515,7 @@ export default class {
|
||||||
|
|
||||||
if (!ffmpegInput) {
|
if (!ffmpegInput) {
|
||||||
// Not yet cached, must download
|
// Not yet cached, must download
|
||||||
const info = await ytdl.getInfo(song.url, {playerClients: ['WEB_CREATOR', 'IOS']});
|
const info = await ytdl.getInfo(song.url);
|
||||||
|
|
||||||
const formats = info.formats as YTDLVideoFormat[];
|
const formats = info.formats as YTDLVideoFormat[];
|
||||||
|
|
||||||
|
@ -524,10 +524,6 @@ export default class {
|
||||||
format = formats.find(filter);
|
format = formats.find(filter);
|
||||||
|
|
||||||
const nextBestFormat = (formats: ytdl.videoFormat[]): ytdl.videoFormat | undefined => {
|
const nextBestFormat = (formats: ytdl.videoFormat[]): ytdl.videoFormat | undefined => {
|
||||||
if (formats.length < 1) {
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (formats[0].isLive) {
|
if (formats[0].isLive) {
|
||||||
formats = formats.sort((a, b) => (b as unknown as {audioBitrate: number}).audioBitrate - (a as unknown as {audioBitrate: number}).audioBitrate); // Bad typings
|
formats = formats.sort((a, b) => (b as unknown as {audioBitrate: number}).audioBitrate - (a as unknown as {audioBitrate: number}).audioBitrate); // Bad typings
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue