Keep a log of played tracks and easily provide information on your web site about what you're currently listening to with your Squeezebox.
Warning: This currently uses threads when FTP-ing files to a remote server. This isn't a great idea as SlimServer is not thread-safe. That said, I have run this plugin on my own server for over 6 months now without any problems. If you do use the FTP features of this plugin, please make sure that you test them first, and disable them again if you have any problems.
This plugin logs information about the tracks that you play on your Squeezebox. It can maintain a log of every track you've ever played, and can also write information about just the currently playing track to a file. The plugin can optionally upload the contents of this file to an ftp server every time the current track changes, allowing you to include it in a web page—I use this to provide the "Currently listening to" information at the bottom of this page. Alternately, you could include the file in your signature in emails, blogs or forum postings.
Download the zip file from the top of this page and unzip it into your SlimServer Plugins directory. This will
create a directory called NowPlaying. You now need to edit the plugin's source file in order to configure it. Within
the NowPlaying directory, there will be a file called Plugin.pm. Open this file in a text editor and change the
"Configurable variables" section at the top of the file. Here, you should specify the location and name of the various
files that the plugin produces. You can disable features by setting the variables to
With any luck, things should now work. To test it, play a track on your Squeezebox and then look to see if the files you specified have been created. If they haven't, have a look at the SlimServer log file for details of what's going on (run SlimServer with the --d_plugins argument for more information). If you want some help, try asking in the SlimDevices Forums.
In order to do this yourself, you'll need the following:
Assuming that your web server isn't running on the same server as SlimServer, you'll need to use the plugin to ftp a file containing the now playing information onto your web server. Once the file is on your web server, you can use one of any number of techniques to place the contents of this file into your web site. I do this using Apache's 'server side includes' and place my now playing file, called nowPlaying.txt, in the root of my web space. I can then include the file using the following bit of code:
In order for this to work, I had to enable server side includes by putting the following in a .htaccess file:
See Apache Tutorial: Introduction to Server Side Includes for more information.
If you can use Perl or PHP on your web site, including the contents of a file is very easy to do. However, I'm afraid that providing details on configuring your web server to do this are a bit beyond the scope of this page!