diff options
| author | ailurux <ailurux@noreply.codeberg.org> | 2024-02-29 05:23:33 +0000 |
|---|---|---|
| committer | ailurux <ailurux@noreply.codeberg.org> | 2024-02-29 05:23:33 +0000 |
| commit | aa87c13799f5d71773b7c73135006acb592182d0 (patch) | |
| tree | 3c6ef26e5a00eecb0e4319377b4bccd71235e9ac /lua | |
| parent | 173b09b0151ae765b1a8e69dfb60d14d502801f6 (diff) | |
| parent | e7e6c70fb31d33ae1e79f9841f5b6fe227f6ebf3 (diff) | |
| download | tangara-fw-aa87c13799f5d71773b7c73135006acb592182d0.tar.gz | |
Merge pull request 'Add seeking support for all codecs' (#50) from seek-support into main
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/50
Reviewed-by: ailurux <ailurux@noreply.codeberg.org>
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/licenses.lua | 3 | ||||
| -rw-r--r-- | lua/playing.lua | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/lua/licenses.lua b/lua/licenses.lua index 38e58678..83437454 100644 --- a/lua/licenses.lua +++ b/lua/licenses.lua @@ -149,9 +149,6 @@ return function() library("MillerShuffle", "Apache 2.0", function() apache("Copyright 2022 Ronald Ross Miller") end) - library("miniflac", "BSD", function() - bsd("Copyright (C) 2022 John Regan <john@jrjrtech.com>") - end) library("ogg", "BSD", function() xiphbsd("Copyright (c) 2002, Xiph.org Foundation") end) diff --git a/lua/playing.lua b/lua/playing.lua index c6a3f47e..4767e42f 100644 --- a/lua/playing.lua +++ b/lua/playing.lua @@ -112,13 +112,17 @@ return function(opts) } playlist:Object({ w = 3, h = 1 }) -- spacer - local scrubber = screen.root:Bar { + local scrubber = screen.root:Slider { w = lvgl.PCT(100), h = 5, range = { min = 0, max = 100 }, value = 0, } + scrubber:onevent(lvgl.EVENT.RELEASED, function() + playback.position:set(scrubber:value()) + end) + local controls = screen.root:Object { flex = { flex_direction = "row", @@ -182,7 +186,9 @@ return function(opts) cur_time:set { text = format_time(pos) } - scrubber:set { value = pos } + if not scrubber:is_dragged() then + scrubber:set { value = pos } + end end), playback.track:bind(function(track) if not track then return end |
