Amarok-Music Tracker for pidgin

There is a music tracker plugin that comes along with the pidgin 30 plugins.. but that doesn’t work good for me and i use only amarok for music. So i decided to write myself a music tracker.
A file in .purple/status.track in the home folder is used to keep track of the available and away status.
This one needs to be started explicity with the pidgin.

Here is the code:

pstatus=`cat $HOME/.purple/status.track`
title=$(dcop amarok player title)
title=`echo $title|cut -d'-' -f1`
album=$(dcop amarok player album)
album=`echo $album|cut -d'-' -f1`
purple-remote "setstatus?status=$pstatus&message=Amarok Now Playing: $title : $album"
while [ TRUE ]; do
pstatusn=`cat $HOME/.purple/status.track`
if [ "$pstatusn" != "$pstatus" ]
then
purple-remote "setstatus?status=$pstatusn&message=Amarok Now Playing: $title : $album"
pstatus=$pstatusn
fi
newtitle=$(dcop amarok player title)
stat=$(dcop amarok player isPlaying)
newtitle=`echo $newtitle|cut -d'-' -f1`
if [ "$stat" = true ]
then
if [ "$title" != "$newtitle" ]
then
album=$(dcop amarok player album)
album=`echo $album|cut -d'-' -f1`\
newtitle=$(dcop amarok player title)
newtitle=`echo $newtitle|cut -d'-' -f1`
purple-remote "setstatus?status=$pstatus&message=Amarok Now Playing: $newtitle : $album"
title=$newtitle
fi
elif [ "$stat" = false ]
then
purple-remote "setstatus?status=$pstatus&message=Amarok Now Playing: Amarok Paused"
fi
done

You can also append a message with the music name if you want by editing the script at the purple-remote command lines

  1. Could you think pleaseeee to develop a plugin to change album cover in Amarok as image in Pidgin (for Hotmail) Please if you can.

    Best regards,
    Abelardo

  2. Hm.. for the lay(wo)men among us..

    How exactly would you install this?

    • Cyriac
    • March 3rd, 2009

    copy paste the code to a textfile and give the text file an executable permission.
    run pidgin, amarok and then the script.

  3. Thank you Cyriac.
    I had thought at first that it worked as a plugin.
    So I had wondered how to install it.

    • Cyriac
    • March 4th, 2009

    :)

  1. September 26th, 2009

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.