SlimScrobbler V0.30
May 27, 2005

Stewart Loving-Gibbard
sloving-gibbard@uswest.net

and also (v0.30)

Ian Parkinson
iwp@iwparkinson.plus.com

--------------------------

Here's SlimScrobbler, a SlimServer plug-in to submit listening data to 
AudioScrobbler, an online music listening habits tracking database.

Relevant URLs:

http://www.slimdevices.com  
   SlimDevices site. Manfacturer of SliMP3, Squeezebox hardware & principal
   developer of SlimServer software

http://slimscrobber.sourceforge.net
   Where to download SlimScrobbler plug-in.

http://www.audioscrobbler.com
   AudioScrobbler website. You'll need to create an account here to use the
   plug-in.

How to install
==============

- Put Scrobbler.pm into the Plugins directory.

- Put the entire SlimScrobbleSupport directory into the Plugins directory.

- Restart SlimServer.
  
- Set your AudioScrobbler username and password. Point your browser at
  the SlimServer's web interface, and navigate through Server Settings ->
  Plugins. Find the Audioscrobbler pane, enter your username and password,
  and hit 'Change'.

  If you have multiple SlimDevices units or streaming clients, you can edit 
  Scrobbler.pm if you want to associate different units with different
  AudioScrobbler accounts. Search for the %playerAccounts hash and read the
  comments. (If this is confusing at all, just configure the default account
  as described above and leave the rest alone - all your players will just
  use the default account, which is fine.)

Dial-up users
=============

- If you don't have an always-on connection to the internet, disable
  AutoSubmit in the Plugin configuration pane. Tracks will be recorded but
  not submitted to AudioScrobbler. To submit, while dialled up, use your
  remote control to navigate through Plugins -> Audioscrobbler Submitter,
  then push right once more. It will say "Hit play to stop AudioScrobbler...";
  instead, hit '+' and the Plugin will submit.

SliMP3 users
============

- If you have an older (SliMP3) player, you may notice short drop-outs caused
  by this plugin. This occurs when the AudioScrobbler website becomes slow. If
  this gets annoying, stop the SlimServer and edit slimserver.conf to include
  the line:
        scrobbler-background-submit=0
  then restart SlimServer. The drop-outs will now occur between tracks
  rather than in the middle of them, however they may be lengthier.

Debug
=====

- If you need to get debug trace out of SlimScrobbler, add:
        scrobbler-debug = 1
  to slimserver.conf, remembering to stop the server first. If you are having
  problems with SlimScrobbler this is the output I'm going to want to see.  



V0.30
=====

- Support for SlimServer v6. It probably won't work with older versions
  any more, unfortunately.

- Configuration UI, in the Server Settings -> Plugins web interface; from
  Eric Koldinger. (You don't have to hack your userid and password into
  Scrobbler.pm any more.)

- Submission in the background rather than between tracks, eliminating
  annoying delays between one track and the next.

- The Plugin was generating spam warnings in AudioScrobbler under various
  circumstances. These should be dramatically reduced, especially if you
  have multiple players on your network.

- Improvements to the traditional non-background submitter (if you choose to
  use it) to reduce the length and frequency of pauses.

- Fixed problems relating to MD5.pm.

- Thanks to Jack Coates, LJ, Dave Dewey and Paul Kubie for bug spotting,
  testing, suggestions etc. (Apologies and thanks to anyone who I've missed.)


V0.27
=====

- Debug messages were on by default. Whoops, fixed.


V0.269
======

- Updated to work with SlimServer 5.3.0. (It may not work completely
  for older versions, but it is likely to work decently, so don't
  be afraid to try it.)

- I've fixed several bugs with the pause/power/play buttons. 

  NOTE: The fundamental problem is I am doing play tracking 
  in the wrong place -- most of my code is devoted to figuring
  out if the SlimServer is playing or not via incomplete 
  information at times, rumors at others. As a result, my code
  is very brittle and easily confused by minor internals tweaks
  to the SlimServer mainline code base. 

  The answer is to put generic play-tracking code into SlimServer.

V0.26
=====

- Ian Parkinson has fixed the BADAUTH problem. He explains:

  "Under some circumstances, SlimScrobbler was unable to submit songs
   after a failure of the Audioscrobbler server, and required a restart
   of the slimserver. This is fixed; it should now resume submitting
   songs after the Audioscrobbler server returns."

- SlimScrobbler will now submit each song individually, by default.

- Eric Gauthier, Dean Blacketter both pointed out I need to
  fix the handling of commands that have no $client structure
  associated with them. This was causing crashes, apparently.

V0.25
=====

- Works with SlimServer 5.1 and later.

- Works with AudioScrobbler plug-in protocol 1.1.

- Now submits album name, if available.

- New variable allows for 100% manual control of track submission 
  via new plug-in menu, thanks to Mike Scott. See $SCROBBLE_AUTOSUBMIT.


V0.24
=====

- Slightly improved installation procedure.

- Now works with Perl 5.6, however Unicode support is disabled.
  Unicode support turns on when you upgrade your Perl installation
  to Perl 5.8. 
  
  What this means: If you are running Perl 5.6, and play artists with
  non-ASCII characters in their names or track titles, these names *may*
  be submitted incorrectly to AudioScrobbler, and *may* display
  incorrectly in AudioScrobbler. Note that because of the half-baked state
  of everything to do with Unicode & AudioScrobbler, an incorrect submission
  may actually display correctly, and vice versa. Yeah, no kidding. (See
  also note in V.20, which still applies, if you are running Perl 5.8).
  
- Still won't work with the compiled (non-Perl) windows server. Sorry, I'm
  working on it.
  

V0.22
=====

Bug:

- Was writing pending songs into Slimp3 install directory, which won't
  usually work on Unix. Pending song files are now written into temporary
  directory on all platforms.

V0.21
=====

Bug:

- :'s in filenames were causing plug-in to fail to load for anyone
  running it with a real SLIMP3 - which is to say, for everyone 
  but myself.

V0.20
=====

Features:

- Multiple SLIMP3s and/or multiple streaming clients supported, 
  along with multiple Audioscrobbler accounts per server.  You
  can now associate different players with different accounts, 
  or share accounts.  When you sync, it counts as one listen, 
  with the master player in control of submission.  
  
- Additional control over submission, with several limits &
  triggers for track play time. You may now set a minimum
  number of seconds, as well as a percentage and absolute time 
  thresholds after which a track is marked as played. The defaults
  are 5 seconds minimum per track, with a track being marked as
  played at 2 minutes or 50% of running time, whichever comes first.
  
  Also, you may set a number of tracks to play after which 
  Audioscrobbler will attempt to submit data. 
  
Bugs:

- UTF-8 (Unicode) submissions may not have been working correctly; 
  definitely now working properly.  Note that as of today the 
  Audioscrobbler server does not yet *display* submitted non-ASCII 
  data properly, however it is being stored correctly and one day 
  will be displayed properly.  
  
- Handshaking now happens only once per client per load of the 
  server, in agreement with clarified client spec.  
  
- I had hoped to clean up the state machine tracking by querying 
  $client about playMode, but this was really no cleaner than the 
  present solution, and to complete it would have required watching 
  server commands as I do now - just a somewhat different set of 
  them. So, I backed out this set of changes and went with the 
  original implementation.  


Notes for further development:
==============================

All of the important improvements I can think of to make to 
SlimScrobbler involve installation and configuration.  

I do think the SlimServer code base could use a standardized "has a 
track really been played" feature as I've developed here. I am
not happy about how ugly the state-machine tracking is, and I'd
like to see something better done, probably as part of the 
main SlimServer code base. I may try this next; if you are going to
beat me to it, let me know. 

.Stew.



  


