PDA

View Full Version : Filtering out tracks per SB



quietdragon
2007-04-26, 10:58
I have a couple of SB, but only one connected to a HT receiver capable of decoding surround sound.

I have ripped one DTS CD which I've ripped to flac as a test. Each track is tagged with an extended tag ENCODING=DTS.

Before ripping any more, I'm looking for some pointers as to where I should look to add the following feature:


SBs that are surround sound capable are permitted to play tracks tagged with ENCODING=DTS
SBs that are not surround sound capable must filter-out (exclude) tracks tagged ENCODING=DTS|DD|etc.


To make this feature extensible, I think it best to implement it as allowing a per-SB meta-data (tag) exclusion filter. Thus each SB could have a different exclusion filter, with the HT SB having an empty filter.

erland
2007-04-26, 12:05
I have a couple of SB, but only one connected to a HT receiver capable of decoding surround sound.

I have ripped one DTS CD which I've ripped to flac as a test. Each track is tagged with an extended tag ENCODING=DTS.

Before ripping any more, I'm looking for some pointers as to where I should look to add the following feature:


SBs that are surround sound capable are permitted to play tracks tagged with ENCODING=DTS
SBs that are not surround sound capable must filter-out (exclude) tracks tagged ENCODING=DTS|DD|etc.


To make this feature extensible, I think it best to implement it as allowing a per-SB meta-data (tag) exclusion filter. Thus each SB could have a different exclusion filter, with the HT SB having an empty filter.

Some questions follows below.

First of all:
1. Are you running a single SlimServer or are all SBs connected to the same SlimServer ?
2. If you are running a single SlimServer, would you be willing to run two SlimServers ? One for the sourround capable SBs and one for the ones without surround capable.

I'm guessing that you are looking for a way to hide the tracks that can't be played when you are browsing, searching and playing tracks on a specific SB ?

If this is the case the easiest solution to get a completely working solution is probably to setup two different SlimServer instances. I think you can run them on the same machine with some advanced configuration of the network settings on the machine, there has been some threads that had some ideas how to do this. You might want to patch the SlimServer scanner source code to look at your ENCODING tag to check if a track shall be included in the scanning process or not.

Would it be enough with a solution that still shows the tracks in the browse and search functions but when you try to play it it will skip to the next track ?
If this is the case you can use the Custom Scan plugin to get the ENCODING tag into the database and then also install the Custom Skip plugin. The Custom Skip plugin can be configured to check tracks against a skip filter before they are played, if a track matches the filter it will be skipped and the next track is played. There is currently no skip filter type for skipping tracks based on a custom tag, but you can implement this in your own plugin.
The Custom Browse plugin can be used to create some new browse menus that only contains the tracks that are compatible with the currently browsed SB, but there is no premade menu templates for this so you will have to edit the XML configuration yourself.

The last solution is to modify the SlimServer source to get this feature. I am not sure, but I suspect this might be a huge task. It would require you to update every database query related to browsing, searching and playing.
However, there are more people that wants a feature like this, the main reason I wrote the MultiLibrary plugin was to get a temporary solution for setups that required multiple libraries. It solve the issue partly regarding browsing(with Custom Browse plugin) and dynamic playlists (with SQL Playlist plugin).

I'm sure some SlimServer developer can give you more information if you feel that the best solution would be to update the SlimServer source.

Philip Meyer
2007-04-26, 14:29
I use Erlands Multi-library plugin. I have separate libraries for my main music, live concerts, and surround sound.

Rather than use an "ENCODING" tag, I add a "Surround Sound" genre to all of the surround sound tracks (plus the normal genre tags).

This doesn't totally prevent surround sound tracks from being played on a squeezebox that is not hooked up to a digital output, as the main slimserver browse methods don't take any notice of the library (eg. if you use random play plugin, it may choose from the whole library unless you have set a genre filter).

I use the slimserver browse methods for playing a specific album and know not to choose surround sound music.

I use Erlands plugins to play random music playlists, and these are configured to not play music in my surround sound library.

Phil

quietdragon
2007-04-28, 08:18
Thanks for all the suggestions. All my SB are connected to the same server for the moment. I didn't realise that the Random Mix plugin had a genre filter, so I'm going to see if taking advantage of this feature will satisfy my current needs.

I've augmented the genre of the test CD to add a "DTS .." prefix, and I will exclude this genre from the Random Mix selection.

My main concern is that I'll get "lucky" and Random Mix will attempt to play the surround sound tracks on the stereo only SBs, so applying the genre filter should solve this problem.

Philip Meyer
2007-04-28, 11:27
>My main concern is that I'll get "lucky" and Random Mix will attempt to
>play the surround sound tracks on the stereo only SBs, so applying the
>genre filter should solve this problem.

The only issue is that I believe the standard Random Mix genre filtering will select tracks that have a matching genre in preference to exclusions. So if you have a track with "Rock" and "DTS" and Rock genre is included with DTS not included, it would still play the track because it would match "Rock".

Erlands plugins allow specific genre inclusions and exclusions, where the exclusions have a higher precidence.

Phil

quietdragon
2007-04-30, 07:39
The only issue is that I believe the standard Random Mix genre filtering will select tracks that have a matching genre in preference to exclusions. So if you have a track with "Rock" and "DTS" and Rock genre is included with DTS not included, it would still play the track because it would match "Rock".

Erlands plugins allow specific genre inclusions and exclusions, where the exclusions have a higher precidence.


So I think you're saying that if I tag a track as "DTS Rock", and have the std Random Mix plugin include "Rock", but exclude "DTS Rock", it will attempt to be clever and match the substring "Rock" in my genre tag.

Is that right?

erland
2007-04-30, 08:54
So I think you're saying that if I tag a track as "DTS Rock", and have the std Random Mix plugin include "Rock", but exclude "DTS Rock", it will attempt to be clever and match the substring "Rock" in my genre tag.

Is that right?
You can configure SlimServer to separate tags in the same tag value into multiple tags. By doing this you can set the genre tag to "DTS;Rock" and configure ";" as the separator character.
When browsing SlimServer both genre "Rock" and genre "DTS" will be available, the combined genre "DTS;Rock" will not be shown in the genres menu.

You can probably use space as the separator character also, and this will give the same result if you tag genre as "DTS Rock".

However, the standard RandomMix plugin doesn't support to exclude a genre, so if you play "Rock" it will play both tracks tagged as "DTS;Rock" and tags played as "Rock". If you play "DTS" with it it will only play the files tagged as "DTS" or "DTS;Rock". If you play both "DTS" and "Rock", it will play files tagged as: "DTS", "DTS;Rock", "Rock".

By using the Dynamic Playlist plugin together with the SQL Playlist plugin, you will get the same type of random playlists. The difference is that these can be configured to exclude a genre, so you can play all tracks that contains "Rock" but does not also contain "DTS", which I believe is what you want.

Philip Meyer
2007-04-30, 14:53
>You can configure SlimServer to separate tags in the same tag value
>into multiple tags. By doing this you can set the genre tag to
>"DTS;Rock" and configure ";" as the separator character.
>When browsing SlimServer both genre "Rock" and genre "DTS" will be
>available, the combined genre "DTS;Rock" will not be shown in the
>genres menu.

Also, it is possible to add multiple genre tags into music files. Mp3tag for example allows you to add multiple genres by entering "Rock\\DTS", or GENRE=Rock and GENRE=DTS.

I find this better, as other applications that don't support multiple tags will usually just use the first (or last) genre, which is beneficial to using an arbitrary split character.