summaryrefslogtreecommitdiff
path: root/experiments/spotify-player/spotify-player.lua
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@users.noreply.github.com>2020-09-21 20:53:22 -0400
committerGitHub <noreply@github.com>2020-09-21 20:53:22 -0400
commit31213af0082bef8344475dbeb84205f1a7e31c7d (patch)
tree2a8b4cad8363c5a0019466edf86d8ef99941d2f4 /experiments/spotify-player/spotify-player.lua
parenta127ffe8efc8ccb91b7a8495c23f67278609df25 (diff)
parent21150bd640f086f617c61b32cde5e45ecfb5158f (diff)
Merge pull request #188 from brucec5/widget-tweaks
Add customizable refresh timeouts to most widgets
Diffstat (limited to 'experiments/spotify-player/spotify-player.lua')
-rw-r--r--experiments/spotify-player/spotify-player.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/experiments/spotify-player/spotify-player.lua b/experiments/spotify-player/spotify-player.lua
index 1873a83..9fb725b 100644
--- a/experiments/spotify-player/spotify-player.lua
+++ b/experiments/spotify-player/spotify-player.lua
@@ -34,6 +34,8 @@ local function worker(args)
local args = args or {}
+ local timeout = args.timeout or 1
+
local function get_artwork(track_id, url)
if ((url ~= nil or url ~='') and not gfs.file_readable('/tmp/' .. track_id)) then
spawn.easy_async('touch /tmp/' .. track_id, function()
@@ -191,7 +193,7 @@ local function worker(args)
)
)
- watch('sp metadata', 1, update_widget, spotify_player)
+ watch('sp metadata', timeout, update_widget, spotify_player)
return spotify_player
end