missing part

This commit is contained in:
NoLogicAlan committed 2026-05-22 15:56:14 +03:00
1 parent 489c1458b1
commit 10f8a1d91e
1 file changed
+8
+8
View File
@@ -333,6 +333,7 @@ export default class Player extends EventEmitter {
_streamingStopped = false; _streamingStopped = false;
_skipping = false; _skipping = false;
_seeking = false; _seeking = false;
_replayingSeek = false;
_currentPassthrough = null; _currentPassthrough = null;
_wasRadio = false; _wasRadio = false;
_radioAnnounced = false; _radioAnnounced = false;
@@ -1254,6 +1255,7 @@ export default class Player extends EventEmitter {
this.leaving = true; this.leaving = true;
this._stopInactivityTimer(); this._stopInactivityTimer();
this._streamingStopped = true; this._streamingStopped = true;
this._replayingSeek = false;
this._clearTrackEndTimer(); this._clearTrackEndTimer();
this._activeTrackOpt = null; this._activeTrackOpt = null;
@@ -1300,6 +1302,7 @@ export default class Player extends EventEmitter {
this._clearTrackEndTimer(); this._clearTrackEndTimer();
this._activeTrackOpt = null; this._activeTrackOpt = null;
this._replayingSeek = false;
try { try {
if (this._moonlink && this._onMoonlinkReady) { if (this._moonlink && this._onMoonlinkReady) {
@@ -1610,6 +1613,7 @@ export default class Player extends EventEmitter {
const current = this.queue.getCurrent(); const current = this.queue.getCurrent();
if (!current?.encoded || !this.connection || this.leaving) return; if (!current?.encoded || !this.connection || this.leaving) return;
this._replayingSeek = true;
this._streamingStopped = true; this._streamingStopped = true;
await this._stopMediaPlayer().catch(() => {}); await this._stopMediaPlayer().catch(() => {});
this._streamingStopped = false; this._streamingStopped = false;
@@ -1637,6 +1641,8 @@ export default class Player extends EventEmitter {
logger.warn("[Player] _replayWithFilters stream error:", e.message); logger.warn("[Player] _replayWithFilters stream error:", e.message);
} }
this._replayingSeek = false;
if (!this.leaving && !this._skipping && !this._seeking && !this._paused) { if (!this.leaving && !this._skipping && !this._seeking && !this._paused) {
const current = this.queue.getCurrent(); const current = this.queue.getCurrent();
if (current?.type === "radio") { if (current?.type === "radio") {
@@ -1656,6 +1662,8 @@ export default class Player extends EventEmitter {
this._activeTrackOpt = null; this._activeTrackOpt = null;
this.playNext().catch(e => logger.error("[Player] post-replay playNext error:", e.message)); this.playNext().catch(e => logger.error("[Player] post-replay playNext error:", e.message));
} }
} else {
this._streamingStopped = false;
} }
} }