summaryrefslogtreecommitdiff
path: root/luals-stubs/queue.lua
diff options
context:
space:
mode:
authorailurux <ailuruxx@gmail.com>2024-04-02 11:13:50 +1100
committerailurux <ailuruxx@gmail.com>2024-04-02 11:13:50 +1100
commite20ebe7574db5aedc73f07b7bb3a0a01eae93c84 (patch)
tree34c93ec8a80e282f3ce3e47dd60c41e46de0f8b3 /luals-stubs/queue.lua
parenta750af35aa6afda40aadca8f7cf8db75f41a43b2 (diff)
parent0d0c4b2307cac8436fea7276956f293262b265ed (diff)
downloadtangara-fw-e20ebe7574db5aedc73f07b7bb3a0a01eae93c84.tar.gz
Merge branch 'main' into lua-volume
Diffstat (limited to 'luals-stubs/queue.lua')
-rw-r--r--luals-stubs/queue.lua20
1 files changed, 18 insertions, 2 deletions
diff --git a/luals-stubs/queue.lua b/luals-stubs/queue.lua
index 08247799..353b4823 100644
--- a/luals-stubs/queue.lua
+++ b/luals-stubs/queue.lua
@@ -1,15 +1,31 @@
--- @meta
---- Properties and functions for inspecting and manipulating the track playback queue
+--- The `queue` module contains Properties and functions that relate to the
+--- device's playback queue. This is a persistent, disk-backed list of TrackIds
+--- that includes the currently playing track, tracks that have been played,
+--- and tracks that are scheduled to be played after the current track has
+--- finished.
--- @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 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.
+--- @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 = {}
+--- Adds the given track or database iterator to the end of the queue. Database
+--- iterators passed to this method will be unnested and expanded into the track
+--- ids they contain.
+--- @param val TrackId|Iterator
+function queue.add(val) end
+
+--- Removes all tracks from the queue.
+function queue.clear() end
+
+--- Moves forward in the play queue, looping back around to the beginning if repeat is on.
function queue.next() end
+
+--- Moves backward in the play queue, looping back around to the end if repeat is on.
function queue.previous() end
return queue