···150150 const aud = now ? this.audio.state(now.id) : undefined;
151151152152 if (aud?.hasEnded() && (await this.isLeader())) {
153153- // NOTE: Not sure yet if this is the best way to approach this.
154154- // The idea is that scrobblers would more easily pick this up,
155155- // as opposed to just resetting the audio.
156156- if (this.repeatShuffle?.repeat()) {
157157- const now = this.queue.now();
158158- if (now) {
159159- await this.queue.add({
160160- inFront: true,
161161- trackIds: [now.id],
162162- });
163163- }
153153+ if (this.repeatShuffle?.repeat() && now) {
154154+ this.audio.seek({ audioId: now.id, currentTime: 0 });
155155+ this.audio.play({ audioId: now.id });
156156+ return;
164157 }
165158166159 await this.queue.shift();