conky-spotify icon indicating copy to clipboard operation
conky-spotify copied to clipboard

Fetches covers but only displays the cover when first starting conky

Open knishofdeath opened this issue 4 years ago • 3 comments

The script is clearly working as it will fetch the cover for the currently playing song in Spotify when Conky is started. The covers folder will also update on every song change, however conky defaults to the blank album art as soon as the song changes even though the new cover is in the current folder. Screenshot from 2020-12-17 10-05-48

knishofdeath avatar Dec 17 '20 18:12 knishofdeath

It looks like the cover.sh script was removing the album art too quickly. Removing the rm lines fixed the issue temporarily.

knishofdeath avatar Dec 17 '20 22:12 knishofdeath

Hi folks! Spotify changes some url, with this changes you can see the covers again:

id.sh #!/bin/bash id=dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' | grep spotify/track/ | cut -d "/" -f5 | cut -d '"' -f1 | sed -n '1p' echo $id

imgurl.sh #!/bin/bash imgurl=dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' | egrep -A 1 "artUrl" | egrep -v "trackid"| cut -b 44- | cut -d '"' -f 1 echo $imgurl

screenshot

That's All!

tavogorriak avatar Jan 10 '23 16:01 tavogorriak

@tavogorriak I tried your fix, but I'm still having issues getting the album cover.

id.sh `#!/bin/bash

id=dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' | grep spotify/track/ | cut -d "/" -f5 | cut -d '"' -f1 | sed -n '1p' echo $id

imgurl.sh

`#!/bin/bash

trackid=dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' | grep -E -A 1 "trackid" | grep -E -v "trackid"| cut -b 44- | cut -d '"' -f 1 #echo $trackid oembed_url="https://open.spotify.com/oembed?url=$trackid" #echo $oembed_url imgurl=dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' | egrep -A 1 "artUrl" | egrep -v "trackid"| cut -b 44- | cut -d '"' -f 1 echo $imgurl`

kaoxk27 avatar Jan 27 '23 20:01 kaoxk27