mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-19 23:14:05 +09:00
working arbitrary track queueing
This commit is contained in:
@@ -84,9 +84,21 @@ class TerrarumMusicPlaylist(
|
||||
}
|
||||
|
||||
fun queueNthSong(n: Int): MusicContainer {
|
||||
checkRefill()
|
||||
internalIndices.add(currentIndexCursor, n)
|
||||
currentIndexCursor -= 1
|
||||
if (shuffled) {
|
||||
internalIndices.clear()
|
||||
refillInternalIndices()
|
||||
internalIndices.add(n)
|
||||
refillInternalIndices()
|
||||
currentIndexCursor = musicList.size - 1
|
||||
}
|
||||
else {
|
||||
internalIndices.clear()
|
||||
refillInternalIndices()
|
||||
refillInternalIndices()
|
||||
currentIndexCursor = musicList.size - 1 + n
|
||||
checkRefill()
|
||||
}
|
||||
|
||||
return musicList[internalIndices[currentIndexCursor]]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user