streamify-audio 2.2.11 → 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.
- package/package.json +1 -1
- package/src/config.js +8 -12
- package/src/discord/Player.js +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "streamify-audio",
|
|
3
|
-
"version": "2.2.
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
function checkYtdlpVersion(ytdlpPath) {
|
|
53
|
+
function autoUpdateYtdlp(ytdlpPath) {
|
|
56
54
|
try {
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
console.
|
|
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]
|
|
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
|
-
|
|
156
|
+
autoUpdateYtdlp(config.ytdlpPath);
|
|
161
157
|
|
|
162
158
|
return config;
|
|
163
159
|
}
|
package/src/discord/Player.js
CHANGED
|
@@ -167,7 +167,8 @@ class Player extends EventEmitter {
|
|
|
167
167
|
guildId: this.guildId,
|
|
168
168
|
adapterCreator: guild.voiceAdapterCreator,
|
|
169
169
|
selfDeaf: true,
|
|
170
|
-
selfMute: false
|
|
170
|
+
selfMute: false,
|
|
171
|
+
group: this.manager.client.user?.id || 'default'
|
|
171
172
|
});
|
|
172
173
|
|
|
173
174
|
this.audioPlayer = createAudioPlayer({
|