diff options
author | streetturtle <streetturtle@users.noreply.github.com> | 2020-09-21 20:53:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-21 20:53:22 -0400 |
commit | 31213af0082bef8344475dbeb84205f1a7e31c7d (patch) | |
tree | 2a8b4cad8363c5a0019466edf86d8ef99941d2f4 /experiments | |
parent | a127ffe8efc8ccb91b7a8495c23f67278609df25 (diff) | |
parent | 21150bd640f086f617c61b32cde5e45ecfb5158f (diff) |
Merge pull request #188 from brucec5/widget-tweaks
Add customizable refresh timeouts to most widgets
Diffstat (limited to 'experiments')
-rw-r--r-- | experiments/spotify-player/spotify-player.lua | 4 |
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 |