Remove redundant use of shell when downloading album art (#47)

* Remove redundant use of shell when downloading album art
This commit is contained in:
HumblePresent 2021-04-19 05:14:15 -05:00 committed by GitHub
parent 9848c3b8f0
commit 5cd408b1c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 5 deletions

View File

@ -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