mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
feat(player): add %previous, %replay, livekit skip guard, and nodelink auto-reconnect (#11, #13, #18, #19, #23)
This commit is contained in:
1 parent
53d0990ebe
commit
e33fbb2fdb
14 files changed
+348
-31
No files matched your search
@@ -827,9 +827,9 @@ class Player extends EventEmitter {
|
||||
async resumePlaybackAfterNodeReconnect() {
|
||||
if (this._destroyed || this.leaving || !this._voiceConn) return false;
|
||||
const current = this.queue?.getCurrent();
|
||||
if (!current || !this._audioBridge?.playing) return false;
|
||||
if (!current || this._paused) return false;
|
||||
|
||||
const posMs = this.computePosition();
|
||||
const posMs = Math.max(0, this.computePosition());
|
||||
logger.player(`[Player:${this._guildId}] Node reconnected — resuming "${current.title}" at ${Math.round(posMs / 1000)}s`);
|
||||
|
||||
try {
|
||||
@@ -1061,8 +1061,8 @@ class Player extends EventEmitter {
|
||||
|
||||
/** @private Stop the audio bridge if currently playing. */
|
||||
_bridgeStop() {
|
||||
if (this._audioBridge?.playing) {
|
||||
this._audioBridge.stop();
|
||||
if (this._audioBridge) {
|
||||
try { this._audioBridge.stop(); } catch (_) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user