vdj 1.4.3 → 1.4.5
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 -1
- package/dist/core/song.js +1 -0
- 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/dist/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/core/song.ts +5 -3
package/dist/core/song.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export default abstract class Song {
|
|
|
11
11
|
readonly title?: string;
|
|
12
12
|
readonly playlistID?: string | number;
|
|
13
13
|
constructor(service: IService);
|
|
14
|
-
|
|
14
|
+
abstract getSongInfo(): Promise<SongInfo>;
|
|
15
15
|
abstract stream(): Promise<ReadableStream> | ReadableStream | null;
|
|
16
|
+
toggleLoop(): boolean;
|
|
16
17
|
}
|
package/dist/core/song.js
CHANGED
|
@@ -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 youtube_dl_exec_1.default(target, { dumpSingleJson: true }, {});
|
|
34
|
+
var res = yield (0, 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 youtube_dl_exec_1.default(url, { dumpSingleJson: true, noCheckCertificates: true, addMetadata: true }, {});
|
|
40
|
+
var res = yield (0, youtube_dl_exec_1.default)(url, { dumpSingleJson: true, noCheckCertificates: true, addMetadata: true }, {});
|
|
41
41
|
return {
|
|
42
42
|
full: true,
|
|
43
43
|
metadataType: "youtubedl",
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Playlist, PlaylistSettings, IService, Song } from './core';
|
|
1
|
+
import { Playlist, PlaylistSettings, IService, Song, SongInfo, PlaylistAddType, SearchType } from './core';
|
|
2
2
|
import YouTubeService from './default_implementations/youtube/service';
|
|
3
3
|
import YouTubeSong from './default_implementations/youtube/song';
|
|
4
4
|
import YoutubedlService from './default_implementations/youtubedl/service';
|
|
5
5
|
import YoutubedlSong from './default_implementations/youtubedl/song';
|
|
6
|
-
export { Playlist, PlaylistSettings, IService, Song, YouTubeService, YouTubeSong, YoutubedlService, YoutubedlSong, };
|
|
6
|
+
export { Playlist, PlaylistSettings, SearchType, PlaylistAddType, IService, Song, SongInfo, YouTubeService, YouTubeSong, YoutubedlService, YoutubedlSong, };
|
package/package.json
CHANGED
package/src/core/song.ts
CHANGED
|
@@ -17,9 +17,11 @@ export default abstract class Song {
|
|
|
17
17
|
Object.defineProperty(this, 'service', { value: service });
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
public
|
|
21
|
-
return this.loop = !this.loop;
|
|
22
|
-
}
|
|
20
|
+
public abstract getSongInfo(): Promise<SongInfo>;
|
|
23
21
|
|
|
24
22
|
public abstract stream(): Promise<ReadableStream> | ReadableStream | null;
|
|
23
|
+
|
|
24
|
+
public toggleLoop(): boolean {
|
|
25
|
+
return this.loop = !this.loop;
|
|
26
|
+
};
|
|
25
27
|
}
|