Custom Skip plugin
From SqueezeboxWiki
Contents |
Overview
The standard SqueezeCenter(formerly known as SlimServer) provides functionality to put tracks in a "Zapped" playlist, these tracks can later be removed from the music library manually. There is no way to exclude specific tracks from a playlist neither a random playlist nor a static saved playlist. The Custom Skip plugin addresses this problem by making it possible put a filter on all playlists, it works best together with the Dynamic Playlist plugin but also works for other type of playlists.
You can define a filter and tracks matching the filter will not be played. By default the filtering is only activated for playlist played through the Dynamic Playlist plugin playlists. If you want to activate the filtering for other type of playlists this can be done in the Custom Skip settings section in "Server Settings/Plugins" in the web interface.
The principle is that you can define one or several filter sets, for each SqueezeBox/Transporter you can specify which filter set that shall be activated. A filter set can contain one or several filter items. Whenever a track is about to be added to the current playlist it is checked against the items in the filter set active for the specific SqueezeBox/Transporter, if one or several filter items matches the track it is skipped and if none of the filter items matches the track it is added to the current playlist and played. For playlists which isn't played through the Dynamic Playlist plugin the filters are instead evaluated when the track is about to be played and if the filters matches the track is removed from the current playlist.
Installation
- Remove any previous version of Custom Skip from the SqueezeCenter Plugins directory if you have manually installed it earlier (this is not needed if you have installed it through Extension Downloader)
- Goto SqueezeCenter Settings/Plugins and select to install Custom Skip. You might need to add Erland's repository to see it, see here for more information regarding this: SqueezeCenter_Repositories. If you don't want to install it through Extension Downloader, you can also download it from the download page and manually unzip the new version in the SqueezeCenter Plugins directory
- Please note that earlier versions of this plugin will require you to also install the License Manager plugin.
- Please note that earlier versions of this plugin will require you to purchase a license.
- Optionally Install other plugins that extends Custom Skip with more functionality
Note!
- More information about how to purchase and activate the commercial license can be found through the License Manager plugin
If you are using SlimServer 6.5 or earlier, you may want to use the old guide instead.
Bugs and new features
The current list of known bugs and wishes for new features can be found here:
If you want to encourage future development of this plugin you should also consider making a donation or purchasing a license
Filter sets
You should think of a filter set as a set of filters which you like to activate when you are in a specific mood or during a specific period.
A typical filter set that is activated most of the time could contain the following filter items
- Skips all tracks with a lower rating than 1
- Skips 50% of the tracks with a rating of 2
- Skips all tracks in the zapped playlist
- Skips all tracks shorter than 30 seconds
- Skips all tracks longer than 10 minutes
- Skips all tracks that belongs to the genre Christmas
The filter items in the same filter set is combined together so if at least one filter item matches the evaluated track the filter will match.
A new filter set is created from the Custom Skip web interface. A recommended usage is that you try to keep the number of filter sets quite low and instead focus on having a good combination of filter items in the filter sets you have.
Filter items
A filter item is a filter that is applied together with the rest of the filter items in the same filter set.
A filter item can be added/changed in the following ways:
- By going to the "Extras/Custom Skip" menu on the SqueezeBox/Transporter
- By clicking on the Edit buttons in the Custom Skip web interface found under "Extras" in the home page of the web interface.
- By browsing to an item on the SqueezeBox/Transporter where a M is shown in the upper right corner, hold play down for a while and you will be able to add/change filter items in the currently active filter based on the item you had selected in the browse menu.
All filter items have the following common parameters:
|
Indicates the percentage chance that a track matching this filter shall be skipped. 100% means that a matching track always will be skipped. All filter items in the filter set is evaluated towards the track, the percentage will be taken from the filter item among the matching filter items that has the highest "Skip percentage" setting. |
|
Indicates how long the filter item shall be valid. Typically you would create a number of filter items with the "Valid" parameter set to "Forever", but then as you listen you might decide that you don't want to listen to anything from the current artist for the next hour. To accomplish this you just setup a filter item that skips the artist and set the "Valid" parameter for that item to an hour in the future. These kind of temporary filter items will be automatically removed when the valid time has expired. |
|
Indicates if a track shall be permanently skipped for the whole playlist if skipped once or if it should just be put among non played tracks so it can come up again. The default is No which means that a skipped track will not be tried again later, this is usually a good setting for most filters. But there are some filters which works better with Yes. For example the Recently added artist filter provided by the Dynamic Playlist plugin, with this filter you typically just want variation by not repeating the same artist several tracks in a row but you still want to play all tracks. If No is used for this filter it would mean that a skipped track wouldn't be played. |
The following filter item types are provided with the Custom Skip plugin, but additional types may also be available from other plugins installed so your list might be longer than this.
Album Skip songs from selected album Artist Skip songs by selected artist Genre Skip songs in selected genre Greater Than Year Skip songs newer or equal to selected year Less Than Year Skip songs older or equal to selected year Long songs Skip long songs Lossy Skip lossy compressed songs below a specified bitrate Lossless Skip lossless compressed songs Not album Skip songs not from selected album Not artist Skip songs not by selected artist Not genre Skip songs not in selected genre Not playlist Skip songs not in selected playlist Playlist Skip songs in selected playlist Short songs Skip short songs Song Skip selected song. Useful if you want to make sure the song isn't repeated for the next day or so. It is better to use artist, album, genre filters to accomplish the same thing since you often want to skip more than a single song. Zapped Skip songs in zapped playlist
Filter item types as separate plugins
You can implement your own filter item types by implementing the methods described below in a separate plugin. The plugin must be enabled for it to be detected by the Custom Skip plugin.
- getCustomSkipFilterTypes
- Returns an array with a an entry for each filter, 'album' in the sample below
- The filter entry must contain a 'name' but it can also contain additional items which you
- need later when tracks are filtered through the filter.
- This method will be called by the Custom Skip plugin when a list of existing filters is needed
- See the methods in the Plugin.pm file for a sample
- checkCustomSkipFilterType
- Returns 1 if the track shall be skipped else 0, this method will be called by Custom Skip plugin
- when a track shall be checked against a filter
- filter = This is the same map for the filter as you returned in the getCustomFilters method
- track = The track object of the track that shall be checked agains the filter
- See the method in the Plugin.pm file for a sample
CLI commands
The prefered way to control Custom Skip from an external application or another plugin is to use the provided CLI interface. Custom Skip provides the following CLI commands.
- Change primary skip filter
- 00:04:20:06:22:b3 customskip setfilter defaultfilterset.cs.xml
- Setting the primary skip filter will also remove the secondary filter if active
- Remove primary skip filter
- 00:04:20:06:22:b3 customskip clearfilter
- Removing the primary skip filter will also remove the secondary filter if active
- Change secondary skip filter
- 00:04:20:06:22:b3 customskip setsecondaryfilter defaultfilterset.cs.xml
- Remove secondary skip filter
- 00:04:20:06:22:b3 customskip clearsecondaryfilter