diff options
author | Chris Bruce <aprofessionalemailaddress@gmail.com> | 2020-09-19 01:08:15 -0700 |
---|---|---|
committer | Chris Bruce <aprofessionalemailaddress@gmail.com> | 2020-09-19 01:08:15 -0700 |
commit | a2eddcdfcd87976866f797b5ad2b795495d2e620 (patch) | |
tree | e3498520985e33915a211389951d6c0c971b972b /experiments/spotify-player | |
parent | a127ffe8efc8ccb91b7a8495c23f67278609df25 (diff) |
Add widget timeouts
Diffstat (limited to 'experiments/spotify-player')
-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 |