conky-spotify
conky-spotify copied to clipboard
Fetches covers but only displays the cover when first starting conky
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.
It looks like the cover.sh script was removing the album art too quickly. Removing the rm lines fixed the issue temporarily.
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
That's All!
@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`