Your Digital Media Has Never Looked So Good

 
os
Topic Author
Posts: 14
Joined: Sun Dec 12, 2004 2:16 am
Location: Cambridge, UK
Contact:

soundbridgescrobbler - Soundbridge/Last.fm integration

Sat Aug 02, 2008 10:10 am

Hi,

I've just posted a first version of a tool I've written to scrobble my Soundbridge plays to Last.fm. It's written in Python so it's cross-platform (developed and tested on Mac).

Go get it from:

http://www.expert-sleepers.co.uk/soundbridgescrobbler/


cheers,
os.
 
ralnar
Posts: 29
Joined: Fri Nov 03, 2006 9:23 am

Sun Aug 10, 2008 1:49 am

This looks interesting. Tried to download and start, but got error:
Traceback (most recent call last):
  File "soundbridgescrobbler.py", line 6, in ?
    from audioscrobbler import AudioScrobblerPost
  File "/Users/xxxmexxx/Documents/soundbridgescrobbler/audioscrobbler.py", line 273, in ?
    from xml.etree.ElementTree import ElementTree
ImportError: No module named etree.ElementTree


I'm on OS X Tiger 10.4.11. I installed latest Python 2.5.2, but it didn't help

/R
 
ralnar
Posts: 29
Joined: Fri Nov 03, 2006 9:23 am

Sun Aug 10, 2008 9:08 am

Rebooting after updating Python did help though...
Thanks, seems to work fine!
So far I have used sbPopper on my laptop, but this s better as I always have the Mac on.
 
ralnar
Posts: 29
Joined: Fri Nov 03, 2006 9:23 am

Sun Aug 10, 2008 10:40 pm

Maybe a bit OT, but how can I get this to Autostart at boot on Mac OS X?
 
os
Topic Author
Posts: 14
Joined: Sun Dec 12, 2004 2:16 am
Location: Cambridge, UK
Contact:

Mon Aug 11, 2008 6:20 am

ralnar wrote:
Maybe a bit OT, but how can I get this to Autostart at boot on Mac OS X?


I guess you could make a script file (extension .sh) to run the python command, and drop that into your login items (in the Accounts section of System Prefs). Maybe.

Glad you got it working btw.
 
ralnar
Posts: 29
Joined: Fri Nov 03, 2006 9:23 am

Mon Aug 11, 2008 2:03 pm

Mission accomplished (after some digging)!
Thanks for leading me in the right direction!
Here's how for anyone else interested:

-Wrote a script sbs.sh
#!/bin/sh
cd Documents
cd sbs
python soundbridgescrobbler username=xxx password=xxx


first two lines to go to right folder

-renamed file to sbs.command

-changed rights with
chmod +x sbs.command
in Terminal

-dropped sbs.command in SystemPrefs/Accounts/Startup objects list
 
scruss
Posts: 7
Joined: Tue Aug 05, 2008 6:47 am
Location: Toronto, ON
Contact:

Tue Aug 12, 2008 7:04 pm

This is really neat! I have it running on my Ubuntu box using the following command:

nohup python ./soundbridgescrobbler.py username=AAA password=BBB > /dev/null 2>&1 &


so there's no terminal output, no stderr output, and the shell isn't hung up. It automatically saw both my SoundBridges, so my recently played looks good and demented: http://www.last.fm/user/scruss.

Thanks!

Stewart

(1438 Artists / 904 Albums / 13889 Tracks / 31.6 Days / 55.85 GB)
Hug a wind turbine today!
 
os
Topic Author
Posts: 14
Joined: Sun Dec 12, 2004 2:16 am
Location: Cambridge, UK
Contact:

Wed Aug 13, 2008 7:25 am

Cool! Good to know it works on Linux too.
 
furious trout
Posts: 1
Joined: Sun Aug 24, 2008 1:37 pm

Sun Aug 24, 2008 1:41 pm

Got it working on Windows Server 2003 R2 no probs.

Thanks for this, I've been after this for a while but lack the necessary skills to figure it out for myself :D

http://www.last.fm/user/Furious_Trout
 
igzabether
Posts: 2
Joined: Mon Aug 25, 2008 6:44 pm

problems getting this going on WindowsXP

Mon Aug 25, 2008 6:50 pm

I got everything installed, but got a problem trying to get it to run:

I installed Python 2.5.2 for Windows and ran the script with the command line from the website: python soundbridgescrobbler.py username=<your last.fm username> password=<your last.fm password>

I don't know what the expected output is since this is the first time I'm running this, but got the following which does not seem correct:

C:\Python25\last.fmscrobbler>python soundbridgescrobbler.py username=myUsername password=myPassword
Service SoundBridge._http._tcp.local. added
Adding Soundbridge "SoundBridge" at 192.168.1.102
C:\Python25\last.fmscrobbler\Zeroconf.py:673: DeprecationWarning: integer argument expected, got float
  self.data.append(struct.pack(format, value))
2008-08-26 01:35:44 : new track for SoundBridge
info: {'album': ''}
required keys not present


I just downloaded it today from the website and I'm running WindowsXP SP2

Thanks for the help!!
-Igzabether
 
os
Topic Author
Posts: 14
Joined: Sun Dec 12, 2004 2:16 am
Location: Cambridge, UK
Contact:

Mon Aug 25, 2008 11:56 pm

That looks absolutely fine. What does it say when you start playing music on your Soundbridge?
 
igzabether
Posts: 2
Joined: Mon Aug 25, 2008 6:44 pm

appears to work!

Tue Aug 26, 2008 3:37 pm

Hey - sorry for wasting your time, but it looked like that warning was a problem. After I start playing tracks, though, it push them up to last.fm just fine. By the way, any chance Roku radio station tracks get pushed as well?

Thanks Very Much!
Igzabether
 
os
Topic Author
Posts: 14
Joined: Sun Dec 12, 2004 2:16 am
Location: Cambridge, UK
Contact:

Wed Aug 27, 2008 12:14 am

Cool, glad it works for you.

Radio stations are tricky - there's no consistent standard for how the track artist and name are reported. E.g. the 'artist' could be the radio station name, and the 'title' could be 'artist name - track title'. Moreover there's usually no way to determine the track length, which is also required for correct scrobbling.

It can probably be done, but I can't see myself doing it any time soon.
 
ralnar
Posts: 29
Joined: Fri Nov 03, 2006 9:23 am

Wed Aug 27, 2008 10:07 am

nohup python ./soundbridgescrobbler.py username=AAA password=BBB > /dev/null 2>&1 &


Updated my OS X script with this and it seems to work. Sometimes a song is scrobbled twice though. Now I have no output to troubleshoot that with though!
 
Goemon
Posts: 38
Joined: Sat Oct 20, 2007 6:58 am
Location: Germany
Contact:

Thu Aug 28, 2008 4:16 pm

Hello,

Thanks for the great software - runs out of the box (err. ZIP-file) on my uNSLUng NAS server. I am happy :D

Any recommendations how to run it automatically after boot?

CU
Goemon
Soundbridge M1001 / uNSLUng / mt-daapd / [url=http://billiatjapan.netfirms.com/Tools4Roku] Tools4Roku
Image
[/url]

Who is online

Users browsing this forum: No registered users and 1 guest