mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
fix(player): _seeking flag leak blocking auto-advance after seek
This commit is contained in:
1 parent
390c4b4e7d
commit
6f2797c0ee
1 file changed
+10
-1
+10
-1
@@ -1602,7 +1602,11 @@ export default class Player extends EventEmitter {
|
|||||||
*/
|
*/
|
||||||
async _replayWithFilters(positionMs = 0) {
|
async _replayWithFilters(positionMs = 0) {
|
||||||
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) {
|
||||||
|
this._replayingSeek = false;
|
||||||
|
this._seeking = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this._replayingSeek = true;
|
this._replayingSeek = true;
|
||||||
try {
|
try {
|
||||||
@@ -2296,6 +2300,11 @@ export default class Player extends EventEmitter {
|
|||||||
|
|
||||||
this._clearTrackEndTimer();
|
this._clearTrackEndTimer();
|
||||||
|
|
||||||
|
if (this._seeking && !this._replayingSeek) {
|
||||||
|
logger.warn("[Player] _seeking flag was stuck true after stream end — resetting to allow auto-advance");
|
||||||
|
this._seeking = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.leaving && !this._skipping && !this._seeking) {
|
if (!this.leaving && !this._skipping && !this._seeking) {
|
||||||
if (songData.type === "radio") {
|
if (songData.type === "radio") {
|
||||||
logger.player(`[Player] Radio stream ended: ${songData.title}`);
|
logger.player(`[Player] Radio stream ended: ${songData.title}`);
|
||||||
|
|||||||
Reference in new issue
Block a user