#!/bin/bash

length=`qdbus org.kde.amarok /TrackList GetLength`
for (( i=0; i<$length; i++ ))
do
   T=`qdbus org.kde.amarok /TrackList GetMetadata $i |grep title: |cut -f 2 -d ":"|tr -s "," " "`
   ni=`expr $i + 1`  
   echo "$ni.$T,"
done
