Skip to content

Commit

Permalink
feat: restart track
Browse files Browse the repository at this point in the history
  • Loading branch information
p5quared committed Aug 18, 2024
1 parent a8f4f4d commit e99f7bf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lua/apple-music/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,13 @@ M.previous_track = function()
print("Apple Music: Previous Track")
end

---Restart the current track
---@usage require('apple-music').restart_track()
M.restart_track = function()
am_run("set player position to 0")
print("Apple Music: Restarted Track")
end

---Toggle playback (play/pause)
---@usage require('apple-music').toggle_play()
M.toggle_play = function()
Expand Down

0 comments on commit e99f7bf

Please sign in to comment.