Playlist Manager Plugin

 

Purpose

 

This plugin has been written specifically for my needs.  I was finding music that was incorrectly tagged or didn’t play properly whilst playing random tracks.  I needed a simple mechanism to record these whilst I was at a Squeezebox, such that when I returned to the PC, I could look through the list and correct the tracks.

 

To achieve this, I was using the in-built SqueezeCenter “Zap” facility, which adds the selected track to a playlist called “Zapped”, and then removes the track from the current playlist.  My plugin enhances the facility using pre-configured playlists.

 

I also wanted a way to add tracks to my morning alarm playlist, without having to load the playlist (losing the current playlist) and then add tracks to it and save it.

 

The long-term goal is to provide new options for adding single selected tracks, albums, or artists from any Squeezebox list to a selected playlist, to provide an easier mechanism to manage playlists directly from the SqueezeBox user interface.

 

It also contains the functionality of the “Save Playlist” plugin as an option within the Playlist Manager menu, so that plugin can be disabled within SqueezeCenter.  The reason for this is that the Save Playlist plugin automatically associates itself with the “Play.hold” remote key.  I wanted to free this key association up.

 

Installation Instructions

 

The plugin can be installed as an extension within Squeezebox Server Settings > Plugins.

 

Alternatively, it can be manually installed by doing the following:

  1. Download the relevant version of the plugin below.
  2. Extract the content to your SqueezeCenter plugins folder.
  3. Restart SqueezeCenter.
  4. Ensure the plugin is enabled in server settings -> plugin.

 

Usage Instructions

 

The plugin allows a track to be selected from the current playlist (aka. the “Now Playing” list).  Navigate to the Now Playing list, and navigate up/down to select a track.  Invoke the plugin by holding down the Add button on the remote until the Playlist Manager menu pops up.

 

The functions that are available from this menu are:

 

Add Track To…

 

This menu allows you to select a playlist to add the currently selected track to.  Select the “Add Track To …” option and then select the playlist you want.

 

There are 3 hard-coded quick-access playlist names – “Bad Music”, “Bad Tags” and “Morning Alarm”.  It is possible to amend these playlist names by editing the plugin code.  These playlist names will be configurable in a future version.

It is also possible to select from a list of all playlists that have been saved into the music library, or to save to a new playlist.

 

The track will be added to the end of the chosen playlist.  If the playlist doesn’t yet exist (or has been deleted), it is created.

 

Zap track

 

This allows you to access the original SqueezeCenter functionality that was bound to the add.hold button action.

 

Save Current Playlist

 

This duplicates the functionality of the “Save Playlist” plugin (it was a copy of that code), which is an official SqueezeCenter plugin.  You can disable/remove the Save Playlist plugin if you always access the feature through my plugin instead.

 

The plugin also allows a track to be selected using the Browse menus.  You can navigate into information about a track, and the select Playlist Manager (for example Browse Artist > [artist] > [album] > [song] > Playlist Manager).

 

 

Customising the Remote Functions

 

One of the known problems is that the plugin tries to assign the add.hold button action to invoke the plugin, but this doesn’t necessarily work if another plugin also wants to customise remote control actions.

 

One workaround is to customise the remote control functions via a SqueezeCenter custom IR map file.

 

Inside your SqueezeCenter installation folder go to .\server\IR\, and create a file called custom.map.

 

Inside the file, enter:

 

[playlist]

add.single         = add

add.hold           = addmenu

 

Then, from the web UI, go to your player settings -> Remote and select Custom from the Remote Button Functions drop down list.

 

These definitions will override the standard remote control functions (any commands not specified will use the standard functionality).

 

addmenu is the PlaylistMan menu.  This replaces the standard "zap" command.  You can swap the .single and .hold functions over if you like.

 

 

It is also possible to configure the Add button to directly enter the Playlist Manager menu, whilst sitting on a Browse menu item

 

[browsedb]

add.single         = play_1

add.hold           = BrowseAddMenu

 

Again, you can swap the .single and .hold functions over if you like.

 

 

Known Problems

 

There's some known problems:

 

  • The add.hold button action may not invoke my plugin if another plugin also customises remote control functions on the now playing screen.  The TrackStat plugin is one such plugin.  See Customising the Remote Functions.
  • It is not possible to add a track twice to a playlist, and SqueezeCenter doesn't display duplicate songs in playlists anyway.  bug 3798.
  • Player UI: Plugins->PlaylistMan menu doesn't do anything yet.
  • Jive (SqueezeBox Controller) support doesn’t work yet.  It may be possible to use the Retro Browser to access the plugin features though.

 

Future Enhancements

 

The following are planned:

 

  • Allow the quick-access playlists to be configured through Home > Extras > Playlist Manager.
  • Provide access to Save Current Playlist from Home > Extras > Playlist Manager.
  • Provide commands to edit playlists (such as delete album from playlist) via Home > Extras > Playlist Manager.  Suggestions welcome for what actions to provide, and how this should work.
  • Provide Add Album To Playlist support from Browse Menus > Track Info menu actions.
  • Options to add the tracks to other places in the destination playlist other than always at the end?
  • Playlist Manager overrides the default (and rather silly) SqueezeCenter functionality that switches the playlist mode from Normal into Party Mode.  Instead, Add.Hold on an Browse menu item will now invoke Playlist Manager.  I can add Playlist mode selection as an action on the Playlist Manager menu.
  • Provide settings to configure the use of add/add.hold remote keys.  E.g. a checkbox to reverse the functions.

 

If anyone has any suggestions that would make the plugin more useable for their needs, please post your thoughts to the Plugins SqueezeCenter mailing list/forum.

 

Alternatively, contact me at: phil AT hergest DOT demon DOT co DOT uk.

 

 

History

 

Version 4.1

Tidy up for Squeezebox Server 7.4.

Added German translations from Dieter Pellkofer.

Fixed issue with localised strings – needed to be UTF-8 and UNIX line endings.

Version 4.0

Use this version for Squeezebox Server 7.3.

Added support for Browse Menus.

Added a settings screen.

Fixed bug whereby pressing add when browsing list of playlists would hang the server.

Added some Danish translations provided by Kurt Poulsen – thanks!

Version 3.1

Changed install.xml to indicate that the plugin will work with any SqueezeCenter version from 7.0 onwards, including future releases.

Version 3.0

Converted to work only with SqueezeCenter7.0 onwards.

Minor changes to tidy source code; added more language strings.

Version 2.1

Fix to use currently selected track rather than currently playing track.

I have only tested this with Slimserver version 6.5.1.

Version 2.0

Slimserver version 6.5 only.

Can save a selected track to any playlist.

Can save a selected track to a new playlist.

Version 1.0

Initial version – pre-Slimserver version 6.5.