PDA

View Full Version : Can I exclude albums from random mix?



marlar
2007-08-25, 01:57
Hi,

I have some albums that I seldom want to hear, but on the other hand I don't want to remove them totally. When browsing it is not a problem since I can just bypass them, but I don't want them to show up in random mixes.

I know I can select which genres to include in the mix, but excluding those genres would also exclude the rest with the same genres!

Is there some way I can do this? One thing that comes to my mind would be a ranking system, where I could give them a low rank and tell the random mix to play only songs above a certain rank.

Thanks in advance!

Martin

srasher
2007-08-25, 04:51
Hi Martin,

another option would be to assign a special additional Genre to these albums (like "NoRandomPlay" or something) and then select this Genre to be ignored for random mix.

Cheers,
Seb

marlar
2007-08-25, 07:38
Hi Seb,

I think that is a very good idea! I just now learned that it is possible to assign multiple genres, so your solution does not have to destroy the original genres :)

Thanks,
Martin

erland
2007-08-25, 08:13
Hi Seb,

I think that is a very good idea! I just now learned that it is possible to assign multiple genres, so your solution does not have to destroy the original genres :)

Thanks,
Martin
Unfortunately this won't work with Random Mix because there is no way to exclude genres from Random Mix. You can choose to not include them but that is not the same thing.

As an example, let say you have a lot of tracks that are tagged with "Pop", and you want to play a random mix with all "Pop" tracks besides those also tagged with genre "BadPop". If you select "Pop" in random mix and don't select "BadPop" it will still play all the "Pop" tracks because those tagged as "BadPop" is also tagged as "Pop".

However, there is a solution to your problem if you are willing to install some third party plugins.

Dynamic PlayList + SQL Playlist:
===============================
These plugins together allow you to both include and exclude genres and do a lot of other kind of smart dynamic playlists. So with these plugins you can play all "Pop" tracks besides those that also is tagged as "BadPop".

TrackStat
=========
This plugin makes it possible to rate your tracks in SlimServer. If you combine this with the above mentioned plugins, you can create a playlist with all "Pop" tracks besides those rated with 2 stars or below.

marlar
2007-08-26, 00:51
Erland,

I actually installed your Custom Browse yesterday! I saw your other plugins but did not know exactly what to use them for.

However, I use Slimserver 6.3.1 because it runs better on my Synology Diskstation than the newer versions. And it took some time to find a version of Custom Browse that worked with it. I found that the latests compatible version is 1.18.2.

Can you say which versions of Dynamic PlayList + SQL Playlist that will work with 6.3.1, or will I have to use trial-and-error?

erland
2007-08-26, 01:42
Can you say which versions of Dynamic PlayList + SQL Playlist that will work with 6.3.1, or will I have to use trial-and-error?
I you wan't to be completely safe, you need to use the releases that were released at the same time as 6.5.0, I think it was around september 2006.

But I supported 6.3 some time after the 6.5 release, so I think the following should work:

Dynamic PlayList
================
- I think version 1.12.1 will work

SQLPlayList
===========
- 1.10.1 was the last I tested with 6.3
- I would recommend you to try if 1.12 works because the user interface got a lot more user friendly in that release.
- The 6.3 support was intentionally removed in 1.18 so release 1.18 and later will definitely not work on 6.3. But you might want to give 1.17 a try. If you use 1.17 you will need at least Dynamic Playlist 1.12.

TrackStat
=========
- The last one I tested with 6.3 is TrackStat 1.28.2, but I think 1.29.1 also might work.

marlar
2007-08-26, 03:51
FYI, the following versions seems to work with 6.3.1:

Dynamic PlayList 1.13
TrackStat 1.29.1
SQLPlayList 1.17

Now I just need to figure out how to use them ;-)

marlar
2007-08-26, 04:17
Correction:

Dynamic PlayList 1.13 installs and show up under plugin settings, but it does not work.

Dynamic PlayList 1.12.1 seems to work (as you said!)

marlar
2007-08-26, 09:23
Erland,

I have some problems which may or may not be related to the fact that I run 6.3.1. Or maybe I just do something wrong.

First, SQLPlayList 1.10.1 as you recommend, does not work at all. I get the error:
404 Not Found: plugins/SQLPlayList/sqlplaylist_newplaylisttypes.html

Well, 1.17 seems to work, partly ...

If I create a new playlist, let's call it mytest, using the instructions in your Wiki, it shows up on the list afterwards as it should. If I then click the play icon, the Squeezebox says "Failed mytest". But then web interface then shows the page for Dynamic Playlist, starting with items like:

Albums/
Artists/
Genres/

etc.

At the bottom I see the names of normal standard playlists. Only these playlists have the play icon.

If I click on for example Albums/ I get a new list starting with

Least played/
Most played/

etc. These have no play icon. At the end there is

Albums played long ago
All albums

etc. which has the play icon. These plays fine on the Squeezebox.

Does all this make any sense to you? Am I missing a step somewhere?

Thanks in advance,
Martin

erland
2007-08-26, 10:01
Does all this make any sense to you? Am I missing a step somewhere?

The "Artists", "Genres", "Albums" menus is created automatically by the TrackStat plugin, it sounds like these are working correctly. They are grouped into different groups in a tree like hierarchy and the play icons are only available on the leaves. If you don't like to see these automatically created playlists, you can hide them using the "Enable/Disable playlists" link in the Dynamic Playlist web interface.


If I create a new playlist, let's call it mytest, using the instructions in your Wiki, it shows up on the list afterwards as it should. If I then click the play icon, the Squeezebox says "Failed mytest"The failed message can occur due to two reasons:
1. The playlist you created didn't match any tracks in your library.
2. There is a bug somewhere in the SQL Playlist code that causes some playlist not to work correctly.

To get more information I would suggest that you do as follows:
1. Goto "Server Settings/Plugins" in the SlimServer web interface and find the "SQL Playlist" section. In the bottom of this section there is a flag related to debugging messages, activate this.
2. After you have activated the debugging messages, goto the playlist again and hit play.
3. When the playlist fails open up a web browser and goto: http://localhost:9000/log.txt
Look if you see any errors in the log, if you can't see anything wrong, post the log here and I will try to see if anything looks strange.

You can also post what parameters you have changed, marked, unmarked in the playlist you created. As a guide you should only change a the default values if you want to limit the playlist contents based on that value. So if you just create a new playlist without changing any options you usually get a playlist that contains the whole library. If you select a genre in the "Included genres" parameter the playlist will be limited to tracks that belong to that specific genre. If you select a genre in the "Excluded genres" parameter, the playlist will be limited to all tracks besides those that contain the genre you checked.

marlar
2007-08-27, 01:39
Here is the log. Looks like a DB problem?

2007-08-27 10:37:38.0678 SQLPlayList: Loading template configuration from: /volume1/SlimServer/Plugins/SQLPlayList/Templates
2007-08-27 10:37:39.2913 SQLPlayList: Loading playlists from: /volume1/SlimServer/Plugins/SQLPlayList/Playlists
2007-08-27 10:37:39.2959 SQLPlayList: Loading template playlists from: /volume1/SlimServer/Plugins/SQLPlayList/Playlists
2007-08-27 10:37:40.0798 SQLPlayList: Searching for playlists in: /volume1/SSODS/var/playlists
2007-08-27 10:37:40.1215 SQLPlayList: Loading playlists from: /volume1/SSODS/var/playlists
2007-08-27 10:37:40.1292 SQLPlayList: Loading template playlists from: /volume1/SSODS/var/playlists
2007-08-27 10:37:49.5093 SQLPlayList: Getting tracks for: Simple
2007-08-27 10:37:49.5102 SQLPlayList: Get playlist: Simple
2007-08-27 10:37:49.5622 SQLPlayList: Replacing 'PlaylistOffset' with 0
2007-08-27 10:37:49.5635 SQLPlayList: Replacing 'PlaylistActiveLibrary' with 0
2007-08-27 10:37:49.5646 SQLPlayList: Replacing 'PlaylistLimit' with 10
2007-08-27 10:37:49.6076 DBD::SQLite::db prepare failed: no such function: rand(1) at dbdimp.c line 271 at /volume1/SlimServer/Plugins/SQLPlayList/Plugin.pm line 3189.
2007-08-27 10:37:49.6254 Database error: no such function: rand(1) at dbdimp.c line 271
DBD::SQLite::db prepare failed: no such function: rand(1) at dbdimp.c line 271 at /volume1/SlimServer/Plugins/SQLPlayList/Plugin.pm line 3189.

erland
2007-08-27, 02:04
It's a 6.5 specific function.
Try this:
1. Open Plugins/SQLPlayList/Plugin.pm in a text editor
2. Replace all occurrences of "rand()" with "random()" without the quotes.
3. Restart SlimServer and try again

marlar
2007-08-27, 09:49
Thanlk, Erland.

Strange. I replaced rand() with random() in the mentioned file and restarted the server, but it still says:

2007-08-27 18:44:42.8456 SQLPlayList: Loading template configuration from: /volume1/SlimServer/Plugins/SQLPlayList/Templates
2007-08-27 18:44:43.9779 SQLPlayList: Loading playlists from: /volume1/SlimServer/Plugins/SQLPlayList/Playlists
2007-08-27 18:44:43.9826 SQLPlayList: Loading template playlists from: /volume1/SlimServer/Plugins/SQLPlayList/Playlists
2007-08-27 18:44:44.8131 SQLPlayList: Searching for playlists in: /volume1/SSODS/var/playlists
2007-08-27 18:44:44.8476 SQLPlayList: Loading playlists from: /volume1/SSODS/var/playlists
2007-08-27 18:44:44.8545 SQLPlayList: Loading template playlists from: /volume1/SSODS/var/playlists
2007-08-27 18:44:50.7632 SQLPlayList: Getting tracks for: Simple
2007-08-27 18:44:50.7642 SQLPlayList: Get playlist: Simple
2007-08-27 18:44:50.8069 SQLPlayList: Replacing 'PlaylistOffset' with 0
2007-08-27 18:44:50.8081 SQLPlayList: Replacing 'PlaylistActiveLibrary' with 0
2007-08-27 18:44:50.8092 SQLPlayList: Replacing 'PlaylistLimit' with 10
2007-08-27 18:44:50.8132 DBD::SQLite::db prepare failed: no such function: rand(1) at dbdimp.c line 271 at /volume1/SlimServer/Plugins/SQLPlayList/Plugin.pm line 3189.
2007-08-27 18:44:50.8148 Database error: no such function: rand(1) at dbdimp.c line 271
DBD::SQLite::db prepare failed: no such function: rand(1) at dbdimp.c line 271 at /volume1/SlimServer/Plugins/SQLPlayList/Plugin.pm line 3189.

What is the file dbdimp.c ? I can't find anywhere on the server!

At line 3189 there is the line:
my $sth = $dbh->prepare( $sql );

Immediately after, debugMsg("Executing: $sql\n") is called. But where does that goto? It's not in the log.

I am a professional PHP developer, so although I have no experience with Perl, you can talk technical to me if that helps!

marlar
2007-08-27, 10:02
Okay, I have come a bit closer.

If I choose "Customize SQL" I can see that the generated SQL does still contain rand() instead of random(). If I edit this manually, it seems to work allright.

I looked for the string "rand()" in the plugin directory and found that the files in /templates/ all contain this function. So apparently I have to replace the function in all these files as well.

Will tell you how it goes ...

marlar
2007-08-27, 10:33
Yep, it works!

And it was not necessary to replade rand() in plugin.pm as there was as test whether to use rand() or random().

Thanks a lot for your help :-)

Martin