streamify-audio 2.1.21 → 2.1.22
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/discord/Player.js +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "streamify-audio",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.22",
|
|
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/discord/Player.js
CHANGED
|
@@ -399,11 +399,11 @@ class Player extends EventEmitter {
|
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
|
|
402
|
-
async _updateVoiceChannelStatus(track) {
|
|
402
|
+
async _updateVoiceChannelStatus(track, force = false) {
|
|
403
403
|
if (!this.voiceChannelStatus.enabled || !track) return;
|
|
404
404
|
|
|
405
405
|
const now = Date.now();
|
|
406
|
-
if (now - this._lastStatusUpdate < 300000) {
|
|
406
|
+
if (!force && now - this._lastStatusUpdate < 300000) {
|
|
407
407
|
log.debug('PLAYER', 'Skipping voice channel status update due to rate limit');
|
|
408
408
|
return;
|
|
409
409
|
}
|
|
@@ -529,7 +529,7 @@ class Player extends EventEmitter {
|
|
|
529
529
|
this._positionTimestamp = Date.now();
|
|
530
530
|
|
|
531
531
|
this._prefetchNext();
|
|
532
|
-
this._updateVoiceChannelStatus(track);
|
|
532
|
+
this._updateVoiceChannelStatus(track, true);
|
|
533
533
|
} catch (error) {
|
|
534
534
|
log.error('PLAYER', `Resume failed: ${error.message}`);
|
|
535
535
|
this._paused = false;
|
|
@@ -543,7 +543,7 @@ class Player extends EventEmitter {
|
|
|
543
543
|
this.audioPlayer.unpause();
|
|
544
544
|
this._paused = false;
|
|
545
545
|
this._positionTimestamp = Date.now();
|
|
546
|
-
this._updateVoiceChannelStatus(this.queue.current);
|
|
546
|
+
this._updateVoiceChannelStatus(this.queue.current, true);
|
|
547
547
|
}
|
|
548
548
|
|
|
549
549
|
return true;
|