respect repeat settings when a-b loop reaches point b
This commit is contained in:
@@ -1199,8 +1199,20 @@ function updateProgress() {
|
|||||||
els.durTime.textContent = fmtTime(dur);
|
els.durTime.textContent = fmtTime(dur);
|
||||||
if (dur) els.seek.value = String((cur / dur) * 1000);
|
if (dur) els.seek.value = String((cur / dur) * 1000);
|
||||||
updateMiniBar();
|
updateMiniBar();
|
||||||
// A-B loop: if both points are set and we pass B, jump to A
|
// A-B loop: passing B behaves like the track ending. Loop the A-B segment only
|
||||||
if (abA !== null && abB !== null && abB > abA && cur >= abB) Player.seek(abA);
|
// when "loop current" is on; otherwise B is the effective end of the track and
|
||||||
|
// we advance per the repeat settings (next track, or wrap when "repeat list").
|
||||||
|
if (abA !== null && abB !== null && abB > abA && cur >= abB) {
|
||||||
|
if (data.settings.loopOne) {
|
||||||
|
Player.seek(abA);
|
||||||
|
} else if (!advanceQueue()) {
|
||||||
|
// Nothing to advance to (repeat off, last track) — stop at B like a real end.
|
||||||
|
Player.pause();
|
||||||
|
Player.seek(abA);
|
||||||
|
updatePlayBtn();
|
||||||
|
$('upnext').classList.add('hidden');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user