Skip to content

Commit

Permalink
Merge pull request open-dynaMIX#6 from Nebukadneza/add_chapters
Browse files Browse the repository at this point in the history
Add chapter seeking buttons
  • Loading branch information
open-dynaMIX committed Jul 7, 2019
2 parents a2db779 + 3a22602 commit 9d0c29f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions webui-page/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,17 @@ <h3 id="album">Album</h3>
</div>
</div>

<div onClick="send('add_chapter', '-1')" class="button left blue">
<div class="content icon-content">
<i class="fas fa-step-backward"></i>
</div>
</div>
<div onClick="send('add_chapter', '1')" class="button right blue">
<div class="content icon-content">
<i class="fas fa-step-forward"></i>
</div>
</div>

<div onClick="send('playlist_prev')" class="button left blue">
<div class="content icon-content">
<i class="fas fa-fast-backward"></i>
Expand Down
8 changes: 8 additions & 0 deletions webui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ local commands = {

cycle_audio_device = function()
return pcall(mp.command, "cycle_values audio-device " .. options.audio_devices)
end,

add_chapter = function(num)
local valid, msg = validate_number_param(num)
if not valid then
return true, false, msg
end
return pcall(mp.command, 'add chapter '..num)
end
}

Expand Down

0 comments on commit 9d0c29f

Please sign in to comment.