cycle the playQueue from lastTrack -> firstTrack when clicking Next on lastTrack
This commit is contained in:
@@ -318,11 +318,7 @@ func (p *playbackEngine) SeekFwdBackN(n int) error {
|
|||||||
newIdx := min(lastIdx, max(0, idx+n))
|
newIdx := min(lastIdx, max(0, idx+n))
|
||||||
|
|
||||||
if idx == lastIdx && n > 0 {
|
if idx == lastIdx && n > 0 {
|
||||||
if p.loopMode == LoopAll {
|
|
||||||
newIdx = 0
|
newIdx = 0
|
||||||
} else {
|
|
||||||
return nil // already on last track, nothing to seek next to
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return p.PlayTrackAt(newIdx)
|
return p.PlayTrackAt(newIdx)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user