streamify-audio 2.0.3 → 2.0.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 +1 -1
- package/src/config.js +19 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "streamify-audio",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Dual-mode audio library: HTTP streaming proxy + Discord player (Lavalink alternative). Supports YouTube, Spotify, SoundCloud with audio filters.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
package/src/config.js
CHANGED
|
@@ -39,6 +39,23 @@ function findExecutable(name) {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
const MIN_YTDLP_VERSION = '2026.01.19';
|
|
43
|
+
|
|
44
|
+
function checkYtdlpVersion(ytdlpPath) {
|
|
45
|
+
try {
|
|
46
|
+
const version = execSync(`"${ytdlpPath}" --version`, { encoding: 'utf-8' }).trim();
|
|
47
|
+
const versionDate = version.split('.').slice(0, 3).join('.');
|
|
48
|
+
|
|
49
|
+
if (versionDate < MIN_YTDLP_VERSION) {
|
|
50
|
+
console.warn(`[CONFIG] ⚠️ yt-dlp version ${version} is outdated`);
|
|
51
|
+
console.warn(`[CONFIG] ⚠️ Live YouTube streams require yt-dlp >= ${MIN_YTDLP_VERSION}`);
|
|
52
|
+
console.warn(`[CONFIG] ⚠️ Update with: yt-dlp --update-to nightly`);
|
|
53
|
+
}
|
|
54
|
+
} catch (e) {
|
|
55
|
+
console.warn('[CONFIG] Could not check yt-dlp version:', e.message);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
42
59
|
function load(options = {}) {
|
|
43
60
|
let fileConfig = {};
|
|
44
61
|
|
|
@@ -123,6 +140,8 @@ function load(options = {}) {
|
|
|
123
140
|
throw new Error('ffmpeg not found. Install it: apt install ffmpeg');
|
|
124
141
|
}
|
|
125
142
|
|
|
143
|
+
checkYtdlpVersion(config.ytdlpPath);
|
|
144
|
+
|
|
126
145
|
return config;
|
|
127
146
|
}
|
|
128
147
|
|