SlimServer Plugins & Scripts

LastFM Internet Radio Plugin

iTunes Update Plugin

iTunes PartyShuffle Plugin

Radio Playlist Plugin

FollowiTunes script

Notes on Running SlimServer interactively
Links


iTunes Update

iTunes Update is a SlimServer plug-in to update your iTunes database with Slimserver client listening data, user ratings and playlists.
Version Date SlimServer version
v2.9.023 June 2013v7.4download iTunesUpdate-2.9.0.zip
v2.7.15 October 2009v7.3/v7.4download iTunesUpdate-2.7.1.zip
v2.5.310 August 2008v7.0-7.2download iTunesUpdate_v2.5.3.zip
v2.1.4 23 November 2007 v6.5 download iTunesUpdate_V2.1.2.zip
v1.5.2 21 January 2006 v6.1-6.3 only download iTunesUpdate152.zip
v1.0.2 23 April 2005 v5.4 only download iTunesUpdate.zip

iTunes versions 4.5 to 9.2 are known to work. Later versions should work but are untested.

Summary:
When a track is played on a SlimServer player, the iTunes "Play count" and "Last played" fields are updated.
When a track is skipped, the Skip count and Last Skipped fields are updated (iTunes 7 only)

From a Squeezebox:
Track details can be seen in the player plugin menu and web interface.
Half-star ratings can be set from the web interface (and will be displayed in iTunes 6.0.3+)

There are two modes of operation, which can be changed from SlimServer (Server Settings - Plugins)
1. Direct update to iTunes (for Windows/Mac Slimserver):
2. Indirect/manual update to iTunes (any Slimserver platform, default on unix). Perl installation required for this mode on Windows.

Installation
see included readme file.

Windows Only: the plugin will NOT work in the default 'direct update' mode if SlimServer is set to 'Automatically run on system start'.
Please use the 'Automatically run on login' option from SlimTray (v6.5.1+) or see notes below


History

v2.9.0Remove AppleScript::Glue dependency
v2.8.3Restore iTunesUpdate.pl to install file
v2.7.1Upgrade for SC7.4
v2.7.0Upgrade for SC7.3
v2.6.0Add experimental bookmark feature
v2.5.3Fix missing rating menu on Jive
v2.5.2Add standard track info to iTunesUpdate Jive menu
v2.5.1Fix syntax error
v2.5.0Fix rating from Jive menus
Fix rating skipped songs when using update script
v2.4.4Added plugin icon
Fix on-player messages
Fix to Jive menus
v2.4.3Changes for new Jive menu structure
v2.4.1Jive support
Fix "ignore filetype" option on Mac
v2.3.1Fixes for artwork loading
v2.3.0Load artwork for tracks as they're added to the playlist
Force strings.txt to unix line endings
v2.2.0SqueezeCenter 7.0 upgrade
v2.1.2Fix ignore filetype option
v2.1.2Note if the user actually changed rating
v2.1.0Support for displaying iTunes downloaded artwork in SlimServer
v2.0.0 iTunesUpdate.pl replaces iTunesUpdateWin.pl with OSX support with Greg Salton's help
v1.9.2 Add missing use POSIX to .pl script
v1.9.1 Don't mark tracks as skipped if they didn't reach the minimum time threshold (5s)
Support SlimServer 7
v1.9.0 Support for iTunes 7's Skip fields
v1.8.0 Add half-star player input support from Barcar
v1.7.6 Fix display routines
v1.7.5 fixes for SS6.5 changes
v1.7.4 web improvements when direct update off
v1.7.3 added ignore filetype option
v1.7.2 implemented TrackStat rating hook so that TrackStat ratings are saved to iTunes
v1.7.1 Fix for SlimServer slash change
v1.7.0 Save ratings in SlimServer database
v1.6.3 Support for half star ratings
v1.6.2 fixed crash on firmware upgrade
v1.6.1 Fixed web pages
v1.6.0 Changes for SlimServer 6.5
v1.5.2 Add Fishbone template, add direct rating buttons
v1.5.1 dereference date object in OSX
v1.5.0 add web interface
v1.4.2 fix for missing ratings in iTunesUpdateWin.pl
v1.4.1 fix crash on blank artist name
v1.4 display iTunes info for current track in Squeezebox menu
v1.3.3 use recomposeUnicode on OSX to fix iTunes Library XML
v1.3.2 fixed UTF8 handling on Windows
v1.3.1 fixed on Windows
v1.3 further OSX changes from Daniel Boss:

match iTunes on file location

disable playlist saving (doesn't work)

tidy up
v1.2 plugin only activated if enabled
v1.1 SlimServer v6.0 compatible
Changed folder arrangement
Fixed incorrect syntax in iTunesUpdateWin.pl
reverted to original Mac logic
v1.0.2 removed OLE Quit from iTunesUpdateWin.pl
plugin only activated if enabled
don't pretend to work on SlimServer v6
v1.0.1 fixed error in number reassignment
fixed date format typo in iTunesUpdateWin.pl
v1.0 Mac platform support (code provided by Daniel Boss)



iTunes Party Shuffle

The “iTunes Party Shuffle” plugin generates dynamic SlimServer playlists from iTunes' playlists.
Version Date SlimServer version
v2.4.219 September 2010v7.0+download iTunesPartyShuffle-2.4.2.zip
v2.2.0 1 May 2007 v6.5 download plugin
v1.2.0 31 July 2006 v6.2/6.3 download plugin
v0.2  March 2005 v5.4 download plugin

iTunes versions 4.5 to 9.2 are known to work. Later versions should work but are untested.
Windows iTunes/SlimServer only, sorry! Offers to help test an OSX Version appreciated.

Installation
I recommend also installing the Dynamic Playlist Plugin as this offers an enhanced interface to the Party Shuffle plugin.
Options
When activated, the current playlist is loaded with tracks from the selected playlist. If duplicate tracks are allowed the current playlist is cleared. You can delete & add tracks from the playlist, skip backwards & forward and the plugin keeps by keeping the configured number of tracks in advance of the one being currently played.

If you also have the iTunes Update plugin running, the play counts & times in iTunes are also updated, so you can run Party Shuffle against a smart playlist with (almost) real-time updating.
If using Party Shuffle, you can select the future tracks before they are loaded. Tracks added to SlimServer are deleted from the Party Shuffle playlist, causing new selections to be generated.
Other playlists can be created and used immediately in SlimServer, without doing a Library re-scan (note that any new tracks added to iTunes since the last rescan will not be playable).

Loading a playlist or turning the player off will disable the plugin or you can stop it from the plugins menu.


v2.4.2Ignore .mp4 files as SlimServer can't play them
v2.4.0SC7.3 upgrade (backward compatible)
v2.3.2Stop plugin from starting iTunes on SqueezeCentre startup
v2.3.0Upgrade for SqueezeCenter 7.0
v2.2.0Add tracks that SlimServer hasn't scanned yet
v2.0.4 Fixed a track order bug when used with non-Party Shuffle playlist
v2.0.3 Fixed a bug when used through Dynamic Playlists plugin



RadioPlaylist Plugin


Version Date SlimServer Version
v2.220 December 2008v7.0+download
v1.2.4 28 December 2006 v6.5 download
v0.4 13 Nov 2005 v6.2/6.3 download

This plugin allows you to select playlist(s) to appear in the Internet Radio section of the client menus & the web interface.

Copy the RadioPlaylist.pm file from the zip file into the Plugins directory of your SlimServer installation.
 
Choose the playlist from the plugins menu either on the players or in the web UI.
The selected playlist(s) will appear in the web home-page and the player's Internet Radio menu as Radio Playlist. Selecting the 'none' option removes the playlist.

v1.1 allows you to set the number of playlists on the Plugin Settings page

v0.4 is configured for 3 playlists by default.
If you want to change this, there is a setting that can be edited within the file.
my @playlist_suffixes = qw/a b c/;
Add or remove letters from the list to configure the number of playlists

v2.2 - SC 7.3 upgrade (backward compatible)
v2.1 - bug fix for player menus
v0.4 - support for multiple playlists
v0.3 - Spanish translation from Nestor Spedalieri
v0.2 - Added web menu option
v0.1 - Initial release


follow iTunes
followiTunes.pl v0.3 10 January 2007 all download script

Requirements: iTunes Windows 4.5 or later, ActivePerl installed.
followiTunes.pl polls iTunes once a second and tells SlimServer to play the same track as iTunes (if changed).
Pausing in iTunes is supported but not ffwd/rewind.

usage:
followiTunes.pl [player=''] [server=127.0.0.1] [port=9000] [interval=1]

I wrote this for a request on the SlimDevices mailing list to see if it was possible. I've never really used it!
I tried using an OLE event hook but this didn't seem to work at all.

v0.3 - January 2007
* bugfix - double escape #; characters
v0.2 - August 2006
* Added cmd-line parameters
* use URI::Escape
* tested with SlimServer 6.5
v0.1 - 2004
* initial release



Snow Screensaver

Snow.pm v2.1 23 Sep 2005 v6.1 download

An update of the old Snow screensaver to work on graphic Squeezeboxes.
This version corrects a bug found in the version bundled with SlimServer that affects the Christmas greetings on Squeezebox G models only.




Running SlimServer interactively (Windows)

The iTunes plugins above will not work if you're running SlimServer on Windows as a service. The problem is caused (as far as I can tell) by the inability of Windows Services to communicate with other processes using OLE.
SlimServer runs as a service if 
chose the 'start automatically' option on installation.
From SlimServer version 6.5.1 this issue can be fixed by changing the
'Automatically run on system start' option in SlimTray to 'Automatically run on login'.

For prior versions h
ere's how to change over to a method of operation that will allow the plugins to work.

1) Stop SlimServer. If SlimTray is running, right click on the icon and choose shut down. If not, open the Services application (usually found in the Administrative Tools folder), and stop the SlimServer service.
2) Disable the service. Using the Services application, open the properties of the SlimServer service, and change the startup type to 'disabled'
3) Stop SlimTray. Right-click and choose exit from the SlimTray icon
4) Disable SlimTray. Delete the shortcut from your Startup folder
5) Open the folder in which you installed SlimServer (e.g. C:\Program Files\SlimServer) and open the Server subdirectory. Right-click on 'slim.exe' or 'slim' and choose 'create shortcut'.
6) Move this new shortcut to your Startup folder. SlimServer will now start automatically when your PC does. If you don't plan on restarting now, double-click the icon now to start SlimServer.
7) If you want a quick way to start the SlimServer web interface return to the SlimServer installation directory. Copy the 'SlimServer Web Interface' shortcut to your startup folder (to see it immediately after a restart) or somewhere you can access it easily. Or you can just bookmark the SlimServer page next time you have it open.

The next time you install SlimServer you'll need to repeat steps 3 & 4, and remember not to choose the 'start automatically option'



Links
www.slimdevices.com
An article on Perl/iTunes integration for Windows
The Apple Windows SDK

www.jamescraig.co.uk
mail me at james . craig at london . com
James Craig 2007