discord-player-youtubei
Advanced tools
Comparing version 1.1.9-beta to 1.1.10
@@ -75,9 +75,4 @@ "use strict"; | ||
const videoInfo = await innerTube.getBasicInfo(id, context.useClient); | ||
if (videoInfo.basic_info.is_family_safe) { | ||
const format = videoInfo.chooseFormat(options.overrideDownloadOptions ?? DEFAULT_DOWNLOAD_OPTIONS); | ||
return format.decipher(innerTube.session.player); | ||
} else { | ||
const download = await videoInfo.download(options.overrideDownloadOptions ?? DEFAULT_DOWNLOAD_OPTIONS); | ||
return import_stream.Readable.fromWeb(download); | ||
} | ||
const download = await videoInfo.download(options.overrideDownloadOptions ?? DEFAULT_DOWNLOAD_OPTIONS); | ||
return import_stream.Readable.fromWeb(download); | ||
} | ||
@@ -87,3 +82,2 @@ | ||
var import_node_async_hooks = require("async_hooks"); | ||
var import_undici = require("undici"); | ||
var YoutubeiExtractor = class _YoutubeiExtractor extends import_discord_player.BaseExtractor { | ||
@@ -106,12 +100,3 @@ static identifier = "com.retrouser955.discord-player.discord-player-youtubei"; | ||
this.innerTube = await import_youtubei.default.create({ | ||
cache: endableCache ? new import_youtubei.UniversalCache(true, this.options.cache?.cacheDir || `${__dirname}/.dpy`) : void 0, | ||
fetch: (url, init) => { | ||
const ipConf = this.routePlanner?.getIP(); | ||
return (0, import_undici.fetch)(url, { | ||
...init, | ||
dispatcher: new import_undici.Agent({ | ||
localAddress: ipConf?.ip | ||
}) | ||
}); | ||
} | ||
cache: endableCache ? new import_youtubei.UniversalCache(true, this.options.cache?.cacheDir || `${__dirname}/.dpy`) : void 0 | ||
}); | ||
@@ -118,0 +103,0 @@ if (this.options.authentication) { |
{ | ||
"name": "discord-player-youtubei", | ||
"version": "1.1.9-beta", | ||
"version": "1.1.10", | ||
"description": "An unofficial package to test the use of youtubei in discord-player v6.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
27822
397