SlimScrobbler V0.34
October 25, 2005

Stewart Loving-Gibbard
sloving-gibbard@uswest.net

and also (since v0.30)

Ian Parkinson
iwp@iwparkinson.plus.com

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

Here's SlimScrobbler, a SlimServer plug-in to submit listening data to 
Last.FM (formerly known as AudioScrobbler), an online music listening habits
tracking database.

Relevant URLs:

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

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

http://www.last.fm/
   Last.FM website. You'll need to create an account here to use the
   plug-in.

(Optional) http://musicbrainz.org/
   MusicBrainz website. Community-driven music database site. The data you
   find here is cleaner than what you have on freedb.

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

- Put Scrobbler.pm into the Plugins directory.

- Put the entire SlimScrobbleSupport directory into the Plugins directory.

- Restart SlimServer.
  
- Set your Last.FM 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 use
  a different Last.FM account with each one. If you want to do this, enable
  "Support for Multiple Usernames" in the SlimServer Plugins web page, and hit
  'Change'. Once the page has reloaded, you can set up all your accounts.
  On each player, use the remote to navigate through Plugins -> Audioscrobbler
  Submitter -> Select Audioscrobbler Account and choose the account to use
  for that player.

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 Last.FM. While dialled up, you can submit using
  your remote control. Navigate into the Plugins -> Audioscrobbler Submitter
  menu and find the option "Press PLAY to submit now". Hit play.

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

- If you have an older (SliMP3) player, you may notice short drop-outs caused
  by this plugin. This occurs when the Last.FM website becomes slow. If
  this gets annoying, stop the SlimServer and edit slimserver.pref
  (slimserver.conf on Linux) to show:
        plugin_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. If you'd
  like to reduce the frequency of these gaps, edit the value of
  plugin_scrobbler_max_pending, which controls the number of tracks which
  must queue up before the submission is attempted.

Proxy Support
=============

- If you're running behind a web proxy, configure it via the SlimServer's
  web interface. Navigate through Server Settings -> Network.

Debug
=====

- If you need to get debug trace out of SlimScrobbler, enable d_plugins
  from the Debugging page on the SlimServer's web interface. If you are having
  problems with SlimScrobbler this is the output I'm going to want to see.  


V0.34
=====

- MusicBrainz identifiers are now submitted if available. Requires SlimServer
  6.2. Thanks to Hakan Tandogan for this.

- Better support for multiple accounts. You can now configure multiple accounts
  via the configuration UI; you don't have to edit Scrobbler.pm any more.

- Nicer menu on the player display.

- Maximum Pending property removed from the configuration UI. If you want
  to set this value away from the default, you should edit the SlimServer's
  configuration file

- Uses preferences named "plugin_scrobbler_..." instead of "scrobbler-..."
  like other SlimServer plugins. Thanks again to Hakan Tandogan.

- Now traces if either d_plugins or plugin_scrobbler_debug is set.

- Fixed another bug causing occasional crashes of the SlimServer.

- Thanks to the good people of SlimDevices for including the server
  portion of Hakan's MusicBrainz work.


V0.32
=====

- Proxy support (unless you turn off the background submitter).

- Fixed bug causing occasional crashes of the SlimServer.

- Fixed bug relating to non-Latin characters again (broken in V0.30).

- Thanks this time to kdf, James Craig, Grotus, Peter D'Hoye, Vidur,
  Malcolm Wotton and anyone I've forgotten.


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.  

