Remove redundant use of shell when downloading album art (#47)
* Remove redundant use of shell when downloading album art
This commit is contained in:
parent
9848c3b8f0
commit
5cd408b1c1
|
@ -98,16 +98,15 @@ function metadata_cb(player, metadata)
|
|||
if player ~= last_player or title ~= last_title or
|
||||
artist ~= last_artist or artUrl ~= last_artUrl
|
||||
then
|
||||
awful.spawn.easy_async_with_shell(get_album_art(artUrl),
|
||||
function(stdout)
|
||||
art_path = stdout:gsub('%\n', '')
|
||||
awful.spawn.with_line_callback(get_album_art(artUrl), {
|
||||
stdout = function(line)
|
||||
awesome.emit_signal("bling::playerctl::title_artist_album",
|
||||
title,
|
||||
artist,
|
||||
art_path,
|
||||
line,
|
||||
player.player_name)
|
||||
end
|
||||
)
|
||||
})
|
||||
-- Re-sync with position timer when track changes
|
||||
position_timer:again()
|
||||
last_player = player
|
||||
|
|
Loading…
Reference in New Issue