summaryrefslogtreecommitdiff
path: root/luals-stubs
diff options
context:
space:
mode:
authorailurux <ailuruxx@gmail.com>2024-12-19 04:29:23 +0000
committercooljqln <cooljqln@noreply.codeberg.org>2024-12-19 04:29:23 +0000
commit5cdc1141ee5f5c7b19809940457b4c4c21db9ae6 (patch)
tree3d4484992bb819a4809ae828ee6cd7f571b00ad7 /luals-stubs
parentceb66b46eac7811a9e1ad4d8141b09947f7ee4b2 (diff)
downloadtangara-fw-5cdc1141ee5f5c7b19809940457b4c4c21db9ae6.tar.gz
Queue repeat modes (#126)
This replaces the previous system of a separate track and queue repeat, with a RepeatMode type with the following options and behaviours: - OFF: No repeat, queue or track. When the current queue finishes, shuffled or otherwise, playback will stop. - REPEAT_TRACK: The current track will loop indefinitely, unless next is explicitly called through some user action (ie using the next button in the now playing screen) - REPEAT_QUEUE: The entire queue will repeat indefinitely. When shuffled is enabled this will repeat the queue with new combinations each cycle. The repeat mode is persisted in non-volatile storage, so the behaviour will be consistent throughout restarts and queue replacements, and so the "queue repeat by default" use case can be met in this way. In addition, I've made it work a little nicer when the queue runs out in the now playing screen, keeping the previously played track shown and playback can be continued by using the play button or by going to a previous song in the queue. Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/126 Co-authored-by: ailurux <ailuruxx@gmail.com> Co-committed-by: ailurux <ailuruxx@gmail.com>
Diffstat (limited to 'luals-stubs')
-rw-r--r--luals-stubs/queue.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/luals-stubs/queue.lua b/luals-stubs/queue.lua
index a0473407..0fcb6258 100644
--- a/luals-stubs/queue.lua
+++ b/luals-stubs/queue.lua
@@ -8,8 +8,7 @@
--- @class queue
--- @field position Property The index in the queue of the currently playing track. This may be zero if the queue is empty. Writeable.
--- @field size Property The total number of tracks in the queue, including tracks which have already been played.
---- @field replay Property Whether or not the queue will be restarted after the final track is played. Writeable.
---- @field repeat_track Property Whether or not the current track will repeat indefinitely. Writeable.
+--- @field repeat_mode Property The current repeat mode for the queue. Writeable.
--- @field random Property Determines whether, when progressing to the next track in the queue, the next track will be chosen randomly. The random selection algorithm used is a Miller Shuffle, which guarantees that no repeat selections will be made until every item in the queue has been played. Writeable.
local queue = {}