Image 01
profile-image

bruj0

Rodrigo Diaz Leven
Amarok 2 Simple

Karamba & Superkaramba by downdiagonal 24 comments

Forgot to mention the cover.sh file must be in $HOME/.superkaramba/amarok2-simple/
- Feb 18 2009
Amarok 2 Simple

Karamba & Superkaramba by downdiagonal 24 comments

I found the problem with missing covers is the ones that have spaces on the file name, ie:

$ qdbus org.kde.amarok /Player GetMetadata | grep arturl
arturl: file:///mnt/storage/sdd/mp3/iTunes%20Music/Amanda%20Palmer/small_cover.jpg


And then when we use "convert" to make it in /tmp/img.png it failes to read the file.
So the fix is:

$ cat cover.sh
#!/bin/sh

if [ `qdbus org.kde.amarok /Player GetMetadata | grep arturl | cut -d : -f 2` ];
then
convert "`qdbus org.kde.amarok /Player GetMetadata |grep arturl | cut -d : -f 3 | cut -c 3- | sed "s/%20/ /g"`" -resize 157x157! /tmp/img.png
echo /tmp/img.png
else
if [ `qdbus org.kde.amarok /Player GetMetadata | grep lastfm | cut -d : -f 2` ];
then
echo image/lastfm.png
fi
fi

Change line 18 in amarok.theme to:
image x=30 y=14 sensor=program program="sh $HOME/.superkaramba/amarok2-simple/cover.sh" interval=5000

What i cant make work are the buttons, i am using compiz-fusion and kde4 if anybody has a suggestion.

- Feb 18 2009