streamify-audio 2.2.12 → 2.2.13

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/config.js +8 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "streamify-audio",
3
- "version": "2.2.12",
3
+ "version": "2.2.13",
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
@@ -50,20 +50,16 @@ function findExecutable(name) {
50
50
  }
51
51
  }
52
52
 
53
- const MIN_YTDLP_VERSION = '2026.01.19';
54
-
55
- function checkYtdlpVersion(ytdlpPath) {
53
+ function autoUpdateYtdlp(ytdlpPath) {
56
54
  try {
57
- const version = execSync(`"${ytdlpPath}" --version`, { encoding: 'utf-8' }).trim();
58
- const versionDate = version.split('.').slice(0, 3).join('.');
59
-
60
- if (versionDate < MIN_YTDLP_VERSION) {
61
- console.warn(`[CONFIG] ⚠️ yt-dlp version ${version} is outdated`);
62
- console.warn(`[CONFIG] ⚠️ Live YouTube streams require yt-dlp >= ${MIN_YTDLP_VERSION}`);
63
- console.warn(`[CONFIG] ⚠️ Update with: yt-dlp --update-to nightly`);
55
+ const result = execSync(`"${ytdlpPath}" -U`, { encoding: 'utf-8', timeout: 30000 }).trim();
56
+ const updated = result.includes('Updated') || result.includes('Updating');
57
+ if (updated) {
58
+ const match = result.match(/Updated.*to\s+([\w@.\-]+)/);
59
+ console.log(`[CONFIG] yt-dlp updated to ${match ? match[1] : 'latest'}`);
64
60
  }
65
61
  } catch (e) {
66
- console.warn('[CONFIG] Could not check yt-dlp version:', e.message);
62
+ console.warn('[CONFIG] yt-dlp auto-update failed:', e.message);
67
63
  }
68
64
  }
69
65
 
@@ -157,7 +153,7 @@ function load(options = {}) {
157
153
  throw new Error('ffmpeg not found. Install it: apt install ffmpeg');
158
154
  }
159
155
 
160
- checkYtdlpVersion(config.ytdlpPath);
156
+ autoUpdateYtdlp(config.ytdlpPath);
161
157
 
162
158
  return config;
163
159
  }