Add luals stubs for new methods

custom
ailurux 8 months ago
parent e96dcde085
commit 7f43d4d126
  1. 14
      luals-stubs/database.lua
  2. 6
      luals-stubs/queue.lua

@ -10,6 +10,19 @@ local database = {}
--- @return Index[] --- @return Index[]
function database.indexes() end 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. --- An iterator is a userdata type that behaves like an ordinary Lua iterator.
--- @class Iterator --- @class Iterator
local Iterator = {} local Iterator = {}
@ -19,6 +32,7 @@ local Iterator = {}
--- @class TrackId --- @class TrackId
local TrackId = {} local TrackId = {}
--- Gets the human-readable text representing this record. The `__tostring` --- Gets the human-readable text representing this record. The `__tostring`
--- metatable function is an alias of this function. --- metatable function is an alias of this function.
--- @class Record --- @class Record

@ -33,4 +33,10 @@ function queue.next() end
--- Moves backward in the play queue, looping back around to the end if repeat is on. --- Moves backward in the play queue, looping back around to the end if repeat is on.
function queue.previous() end 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 return queue

Loading…
Cancel
Save