discord-player-youtubei 2.0.0-dev → 2.0.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12 -2
- package/dist/index.mjs +11 -2
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SearchQueryType, Track, BaseExtractor, ExtractorStreamable, ExtractorSearchContext, ExtractorInfo, Playlist, GuildQueueHistory, Player } from 'discord-player';
|
|
2
2
|
import Innertube$1, { YTNodes, SessionOptions, OAuth2Tokens, Innertube as Innertube$2 } from 'youtubei.js';
|
|
3
|
+
export { Log } from 'youtubei.js';
|
|
3
4
|
import { ProxyAgent } from 'undici';
|
|
4
5
|
import * as Innertube from 'youtubei.js/agnostic';
|
|
5
6
|
import Innertube__default from 'youtubei.js/agnostic';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SearchQueryType, Track, BaseExtractor, ExtractorStreamable, ExtractorSearchContext, ExtractorInfo, Playlist, GuildQueueHistory, Player } from 'discord-player';
|
|
2
2
|
import Innertube$1, { YTNodes, SessionOptions, OAuth2Tokens, Innertube as Innertube$2 } from 'youtubei.js';
|
|
3
|
+
export { Log } from 'youtubei.js';
|
|
3
4
|
import { ProxyAgent } from 'undici';
|
|
4
5
|
import * as Innertube from 'youtubei.js/agnostic';
|
|
5
6
|
import Innertube__default from 'youtubei.js/agnostic';
|
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// lib/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
+
Log: () => import_youtubei5.Log,
|
|
33
34
|
YoutubeiExtractor: () => YoutubeiExtractor,
|
|
34
35
|
defaultFetch: () => defaultFetch,
|
|
35
36
|
defaultPeerUrlBuilder: () => defaultPeerUrlBuilder,
|
|
@@ -289,14 +290,21 @@ async function generateStreamWithYoutubeDL(track, youtubei) {
|
|
|
289
290
|
jsRuntimes: "node",
|
|
290
291
|
format: videoFormat,
|
|
291
292
|
output: "-",
|
|
292
|
-
cookies: youtubei.options.cookie
|
|
293
|
+
cookies: youtubei.options.cookie,
|
|
294
|
+
noWarnings: true,
|
|
295
|
+
noProgress: true
|
|
293
296
|
});
|
|
294
297
|
process2.catch((e) => {
|
|
295
298
|
player.debug("YOUTUBEI: Ran into an error during stream extraction");
|
|
296
299
|
if (youtubei.options.logLevel === "ALL") console.log(e);
|
|
297
300
|
});
|
|
298
301
|
const stream = process2.stdout;
|
|
299
|
-
|
|
302
|
+
if (!stream) return void 0;
|
|
303
|
+
const killProcess = () => process2.killed && process2.kill();
|
|
304
|
+
stream.on("close", killProcess);
|
|
305
|
+
stream.on("error", killProcess);
|
|
306
|
+
stream.on("end", killProcess);
|
|
307
|
+
return stream;
|
|
300
308
|
}
|
|
301
309
|
|
|
302
310
|
// lib/Extractor/Youtube.ts
|
|
@@ -864,6 +872,7 @@ function getYoutubeiInstance() {
|
|
|
864
872
|
}
|
|
865
873
|
|
|
866
874
|
// lib/index.ts
|
|
875
|
+
var import_youtubei5 = require("youtubei.js");
|
|
867
876
|
var exit = (message, clean) => {
|
|
868
877
|
if (clean) {
|
|
869
878
|
console.log(message);
|
|
@@ -895,6 +904,7 @@ Make sure you are using a throwaway account to login. Using your main account ma
|
|
|
895
904
|
}
|
|
896
905
|
// Annotate the CommonJS export names for ESM import in node:
|
|
897
906
|
0 && (module.exports = {
|
|
907
|
+
Log,
|
|
898
908
|
YoutubeiExtractor,
|
|
899
909
|
defaultFetch,
|
|
900
910
|
defaultPeerUrlBuilder,
|
package/dist/index.mjs
CHANGED
|
@@ -257,14 +257,21 @@ async function generateStreamWithYoutubeDL(track, youtubei) {
|
|
|
257
257
|
jsRuntimes: "node",
|
|
258
258
|
format: videoFormat,
|
|
259
259
|
output: "-",
|
|
260
|
-
cookies: youtubei.options.cookie
|
|
260
|
+
cookies: youtubei.options.cookie,
|
|
261
|
+
noWarnings: true,
|
|
262
|
+
noProgress: true
|
|
261
263
|
});
|
|
262
264
|
process2.catch((e) => {
|
|
263
265
|
player.debug("YOUTUBEI: Ran into an error during stream extraction");
|
|
264
266
|
if (youtubei.options.logLevel === "ALL") console.log(e);
|
|
265
267
|
});
|
|
266
268
|
const stream = process2.stdout;
|
|
267
|
-
|
|
269
|
+
if (!stream) return void 0;
|
|
270
|
+
const killProcess = () => process2.killed && process2.kill();
|
|
271
|
+
stream.on("close", killProcess);
|
|
272
|
+
stream.on("error", killProcess);
|
|
273
|
+
stream.on("end", killProcess);
|
|
274
|
+
return stream;
|
|
268
275
|
}
|
|
269
276
|
|
|
270
277
|
// lib/Extractor/Youtube.ts
|
|
@@ -832,6 +839,7 @@ function getYoutubeiInstance() {
|
|
|
832
839
|
}
|
|
833
840
|
|
|
834
841
|
// lib/index.ts
|
|
842
|
+
import { Log } from "youtubei.js";
|
|
835
843
|
var exit = (message, clean) => {
|
|
836
844
|
if (clean) {
|
|
837
845
|
console.log(message);
|
|
@@ -862,6 +870,7 @@ Make sure you are using a throwaway account to login. Using your main account ma
|
|
|
862
870
|
await youtube.session.signIn();
|
|
863
871
|
}
|
|
864
872
|
export {
|
|
873
|
+
Log,
|
|
865
874
|
YoutubeiExtractor,
|
|
866
875
|
defaultFetch,
|
|
867
876
|
defaultPeerUrlBuilder,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "discord-player-youtubei",
|
|
3
|
-
"version": "2.0.0-dev",
|
|
3
|
+
"version": "2.0.0-dev.2",
|
|
4
4
|
"description": "An unofficial package to test the use of youtubei in discord-player v6.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"repository": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"jsdom": "^26.1.0",
|
|
26
26
|
"tiny-typed-emitter": "^2.1.0",
|
|
27
27
|
"undici": "^7.1.0",
|
|
28
|
-
"youtube-dl-exec": "^3.
|
|
28
|
+
"youtube-dl-exec": "^3.1.3",
|
|
29
29
|
"youtubei.js": "^16.0.1"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|