vdj 1.4.5 → 1.4.7
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/core/song.d.ts +2 -0
- package/dist/core/song.js +2 -0
- package/dist/default_implementations/youtube/song.d.ts +0 -1
- package/dist/default_implementations/youtube/song.js +1 -1
- package/dist/default_implementations/youtubedl/service.js +2 -2
- package/dist/default_implementations/youtubedl/song.js +1 -1
- package/package.json +5 -5
- package/src/core/song.ts +2 -0
- package/src/default_implementations/youtube/song.ts +0 -1
- package/test/test.js +2 -0
package/dist/core/song.d.ts
CHANGED
package/dist/core/song.js
CHANGED
|
@@ -12,7 +12,6 @@ export default class YouTubeSong extends Song {
|
|
|
12
12
|
readonly URL: string;
|
|
13
13
|
readonly live: boolean;
|
|
14
14
|
info: SongInfo;
|
|
15
|
-
seek: number;
|
|
16
15
|
logger?: Logger;
|
|
17
16
|
constructor(service: YouTubeService, video: Video, playlistID?: string, logger?: Logger, seek?: number);
|
|
18
17
|
getSongInfo(): Promise<SongInfo>;
|
|
@@ -31,13 +31,13 @@ class YoutubedlService {
|
|
|
31
31
|
}
|
|
32
32
|
canFetch(target, logger) {
|
|
33
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
var res = yield
|
|
34
|
+
var res = yield youtube_dl_exec_1.default(target, { dumpSingleJson: true }, {});
|
|
35
35
|
return !!res;
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
getSongInfo(url, logger) {
|
|
39
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
-
var res = yield
|
|
40
|
+
var res = yield youtube_dl_exec_1.default(url, { dumpSingleJson: true, noCheckCertificates: true, addMetadata: true }, {});
|
|
41
41
|
return {
|
|
42
42
|
full: true,
|
|
43
43
|
metadataType: "youtubedl",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vdj",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"chai": "^4.2.0",
|
|
14
14
|
"dotenv": "^8.2.0",
|
|
15
|
-
"mocha": "^
|
|
15
|
+
"mocha": "^10.2.0",
|
|
16
16
|
"typescript": "^3.9.7"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@types/node": "^12.19.2",
|
|
20
|
-
"got": "^
|
|
20
|
+
"got": "^13.0.0",
|
|
21
21
|
"simple-youtube-api": "^5.2.1",
|
|
22
|
-
"youtube-dl-exec": "^2.
|
|
23
|
-
"ytdl-core": "^4.11.
|
|
22
|
+
"youtube-dl-exec": "^2.4.7",
|
|
23
|
+
"ytdl-core": "^4.11.5"
|
|
24
24
|
}
|
|
25
25
|
}
|
package/src/core/song.ts
CHANGED
|
@@ -5,6 +5,8 @@ export default abstract class Song {
|
|
|
5
5
|
public readonly service: IService;
|
|
6
6
|
|
|
7
7
|
public loop: boolean = false;
|
|
8
|
+
public live = false;
|
|
9
|
+
public seek = 0;
|
|
8
10
|
public abstract readonly type: string;
|
|
9
11
|
public abstract readonly streamURL: string;
|
|
10
12
|
public abstract readonly URL: string;
|
|
@@ -14,7 +14,6 @@ export default class YouTubeSong extends Song {
|
|
|
14
14
|
public readonly URL: string;
|
|
15
15
|
public readonly live: boolean;
|
|
16
16
|
public info: SongInfo;
|
|
17
|
-
public seek: number;
|
|
18
17
|
public logger?: Logger;
|
|
19
18
|
|
|
20
19
|
constructor(service: YouTubeService, video: Video, playlistID?: string, logger?: Logger, seek: number = 0) {
|
package/test/test.js
CHANGED
|
@@ -154,8 +154,10 @@ describe("Playlist", function () {
|
|
|
154
154
|
metadataType: "youtubedl",
|
|
155
155
|
url: input[0],
|
|
156
156
|
},
|
|
157
|
+
live: false,
|
|
157
158
|
logger: undefined,
|
|
158
159
|
loop: false,
|
|
160
|
+
seek: 0,
|
|
159
161
|
service: playlist.services[0],
|
|
160
162
|
streamURL: input[0],
|
|
161
163
|
type: "youtubedl",
|