summaryrefslogtreecommitdiff
path: root/luals-stubs
diff options
context:
space:
mode:
authorailurux <ailuruxx@gmail.com>2024-09-19 14:04:13 +1000
committerailurux <ailuruxx@gmail.com>2024-09-19 14:04:13 +1000
commit7f43d4d1265ce7f456b36f51987c812d35bcd616 (patch)
tree621aba31b0a1b8f06eb1005f5f5cc9ce9ebced83 /luals-stubs
parente96dcde0852526b33ee522dc0b1df8cdd0bc1253 (diff)
downloadtangara-fw-7f43d4d1265ce7f456b36f51987c812d35bcd616.tar.gz
Add luals stubs for new methods
Diffstat (limited to 'luals-stubs')
-rw-r--r--luals-stubs/database.lua14
-rw-r--r--luals-stubs/queue.lua6
2 files changed, 20 insertions, 0 deletions
diff --git a/luals-stubs/database.lua b/luals-stubs/database.lua
index 753961fe..92c2fb8d 100644
--- a/luals-stubs/database.lua
+++ b/luals-stubs/database.lua
@@ -10,6 +10,19 @@ local database = {}
--- @return Index[]
function database.indexes() end
+--- Returns the track in the database with the id given
+--- @param id TrackId
+--- @return Track
+function database.track_by_id(id) end
+
+
+--- @class Track
+--- @field id TrackId The track id of this track
+--- @field filepath string The filepath of this track
+--- @field saved_position integer The last saved position of this track
+--- @field tags table A mapping of any available tags to that tag's value
+local Track = {}
+
--- An iterator is a userdata type that behaves like an ordinary Lua iterator.
--- @class Iterator
local Iterator = {}
@@ -19,6 +32,7 @@ local Iterator = {}
--- @class TrackId
local TrackId = {}
+
--- Gets the human-readable text representing this record. The `__tostring`
--- metatable function is an alias of this function.
--- @class Record
diff --git a/luals-stubs/queue.lua b/luals-stubs/queue.lua
index 97583587..a0473407 100644
--- a/luals-stubs/queue.lua
+++ b/luals-stubs/queue.lua
@@ -33,4 +33,10 @@ function queue.next() end
--- Moves backward in the play queue, looping back around to the end if repeat is on.
function queue.previous() end
+--- Play a track starting from a number of seconds in
+--- This will replace the existing queue
+--- @param filepath string
+--- @param seconds_offset integer
+function queue.play_from(filepath, seconds_offset) end
+
return queue