FireFly Media Server › Firefly Media Server Forums › Firefly Media Server › Feature Requests › AudioScrobbler / last.fm support › Reply To: AudioScrobbler / last.fm support
26/11/2006 at 11:01 PM
#5218
riro
Participant
@-Ra- wrote:
I’m a new user to firefly… thank you for the great software 😀
I’m just wondering if and when you’ll add last.fm scrobbling support to make this the perfect media server.
Found a bash-script somewhere on this forum that did the trick for me. Well.. a bit of the trick. You need rockscrobbler too.
http://www.misticriver.net/photos/displayimage.php?album=lastup&cat=22288&pos=0
#!/bin/bash
SQLITE="sqlite3"
DATABASE="/opt/var/mt-daapd/songs3.db"
ROCKDIR=$HOME/rockscrobbler
OUTLOG=$ROCKDIR/firefly-scrobbler.log
LASTFILE=$ROCKDIR/scrobbler.date
ROCKPL=$ROCKDIR/rockscrobbler.pl
LASTUSER=Rupstjarn55
LASTPWD=mypwd
cd $ROCKDIR
if [ -e $LASTFILE ]
then
. $LASTFILE
else
LASTRUN=0
fi
echo "#AUDIOSCROBBLER/1.0" > $OUTLOG
echo "#TZ/UNKNOWN" >> $OUTLOG
echo "#CLIENT/Firefly svn-1281" >> $OUTLOG
$SQLITE $DATABASE 'SELECT artist,album,title,track,song_length,time_played FROM songs where time_played > '$LASTRUN' ORDER BY time_played ASC;' | awk -F '|' '{ printf "%st%st%st%st%dtLt%sn",$1,$2,$3,$4,$5/600,$6 }' >> $OUTLOG
echo "LASTRUN="`date +%s` > $LASTFILE
perl $ROCKPL -u $LASTUSER -p $LASTPWD -f $OUTLOG -d $ROCKDIR/ -t 0