vdj 1.6.3 → 1.6.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vdj",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -62,26 +62,20 @@ export default class YouTubeSong extends Song {
62
62
  }
63
63
 
64
64
  public stream(): ReadableStream | null {
65
- try {
66
- const stream = ytdlexec(
67
- this.streamURL,
68
- {
69
- output: '-',
70
- format: 'bestaudio/best',
71
- limitRate: '1M',
72
- rmCacheDir: true,
73
- quiet: true,
74
- },
75
- { stdio: ['ignore', 'pipe', 'ignore'] }
76
- );
77
- stream.catch((err) => {
78
- this.logger && this.logger(`[${this.type}] Error while streaming: ${err}`);
79
- });
80
- return stream.stdout;
81
- }
82
- catch (err) {
83
- this.logger && this.logger(`[${this.type}] Error while streaming: ${err}`);
84
- }
85
- return null;
65
+ const stream = ytdlexec(
66
+ this.streamURL,
67
+ {
68
+ output: '-',
69
+ format: 'bestaudio/best',
70
+ limitRate: '1M',
71
+ rmCacheDir: true,
72
+ verbose: true,
73
+ },
74
+ { stdio: ['ignore', 'pipe', 'ignore'] }
75
+ );
76
+ stream.catch((err) => {
77
+ this.logger && this.logger(err);
78
+ });
79
+ return stream.stdout;
86
80
  }
87
81
  }
@@ -41,6 +41,9 @@ export default class YoutubedlSong extends Song {
41
41
  },
42
42
  { stdio: ['ignore', 'pipe', 'ignore'] }
43
43
  );
44
+ stream.catch((err) => {
45
+ this.logger && this.logger(err);
46
+ });
44
47
  return stream.stdout;
45
48
  }
46
49
  }