You are here: Home » Topic » AudioScrobbler / last.fm support

AudioScrobbler / last.fm support

This topic contains 53 replies, has 17 voices, and was last updated by  pcace 8 years, 7 months ago.

Viewing 15 posts - 1 through 15 (of 54 total)
  • Author
    Posts
  • #387

    t0m
    Participant

    ron,

    in january 2005 you wrote

    I’m definately going to add audioscrobbler support, because it’s just too damn cool.

    I hope this is still on your roadmap….

    shouldn’t be to hard to implement some code like http://www.frob.nl/scribble-download.html in dispatch.c under the /* update play counts */ section….

    unfortunately I don’t have any programing skills – otherwise I’d have it implemented on my own….

    /t0m

    #5215

    rpedde
    Participant

    @t0m wrote:

    shouldn’t be to hard to implement some code like http://www.frob.nl/scribble-download.html in dispatch.c under the /* update play counts */ section….

    yes, but I was going to put that in a separate plug-in.

    — Ron

    #5216

    t0m
    Participant

    @rpedde wrote:

    yes, but I was going to put that in a separate plug-in.

    thanks for the fast reply…. looking forward to the plugin….

    /t0m

    #5217

    -Ra-

    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.

    #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
    #5219

    thorstenhirsch
    Participant

    And will there be a non-tricky solution for last.fm, too?

    #5220

    riro
    Participant

    @thorstenhirsch wrote:

    And will there be a non-tricky solution for last.fm, too?

    Isnt that tricky…

    You need:
    – the script above
    – rockscrobbler
    – one cron job

    It works like:
    1. The script creates a logfile that rockscrobbler needs
    2. Rockscrobbler posts the info to last.fm
    3. The script runs every XX minutes (I run it every 20 minutes) with the cron-job.

    Rockscrobbler can be found at http://www.misticriver.net/photos/displayimage.php?album=lastup&cat=22288&pos=0

    btw, the 2 lines in the script that starts with “$SQLITE $DAT”… and that ends with “…>> $OUTLOG” should be on the same line.

    #5221

    smbrannan
    Participant

    Just wondering if/when firefly will communicate with last.fm.

    I’ve tried the script technique described in this thread but it doesn’t work for me. Probably because I don’t really know much/anything about making these sorts of scripts work in OS X.

    It sure would be cool if last.fm support was somehow packaged with firefly.

    #5222

    rpedde
    Participant

    @smbrannan wrote:

    Just wondering if/when firefly will communicate with last.fm.

    I’ve tried the script technique described in this thread but it doesn’t work for me. Probably because I don’t really know much/anything about making these sorts of scripts work in OS X.

    It sure would be cool if last.fm support was somehow packaged with firefly.

    Yes, I want it too, I’m just slow and lame. 🙂

    I’ve started on the lua scripting stuff already, but it’s just taking longer than I hoped. I’m learning as go with the lua stuff. I hope to have some simple scripts in the the next couple nightlies, though.

    Once that’s done, then I think the last.fm scripting stuff will be fairly easy.

    — Ron

    #5223

    smbrannan
    Participant

    @rpedde wrote:

    Once that’s done, then I think the last.fm scripting stuff will be fairly easy.

    — Ron

    Sounds good – thanks for the update. I’ll be looking for it – will you make some sort of announcement?

    S

    #5224

    rpedde
    Participant

    @smbrannan wrote:

    @rpedde wrote:

    Once that’s done, then I think the last.fm scripting stuff will be fairly easy.

    — Ron

    Sounds good – thanks for the update. I’ll be looking for it – will you make some sort of announcement?

    S

    There is an rss feed at http://nightlies.mt-daapd.org. That will have notes when I’ve added it.

    – Ron

    #5225

    djurnove
    Participant

    A few questions about the script:

    1. My songs db is “songs.gdb”, not “songs3.db”. As long as I change the path in the script, will this matter? Are they two different db formats?

    2. My slug doesn’t seem to have sqlite installed – any tips on installing it, or where to to find it if it is already installed?

    Thanks!

    #5226

    t0m
    Participant

    @djurnove wrote:

    A few questions about the script:

    1. My songs db is “songs.gdb”, not “songs3.db”. As long as I change the path in the script, will this matter? Are they two different db formats?

    songs3.db is sqlite3 format
    songs.db is sqlite2 format
    songs.gdb is another textbased(?) format.

    the script was/is for sqlite databases only – sorry.

    #5227

    t0m
    Participant

    I’ve modified the rockscrobbler perl script by noleti so you actually only need one script.

    this script supports compilations. You can download it from:

    http://rapidshare.com/files/31760952/firescrobbler.zip

    this is a sqlite3 version – for sqlite2 add use DBD::SQLite2;

    I’ve been testing this script for two weeks now (cronjob running every 5 minutes) – its working fine for me.
    /t0m

    #5228

    djurnove
    Participant

    Is there a way to change my installation (on an NSLU2) to use sqlite instead of gdb? There doesn’t seem to be an option in the cfg file.

Viewing 15 posts - 1 through 15 (of 54 total)

The forum ‘Feature Requests’ is closed to new topics and replies.