Page 1 of 1

Load random playlist with script

Posted: 17 May 2014 16:51
by friso
Hello

I want to schedule an hour with an hole album, sorted from track 1 to ....
Made some playlists from albums.
Now here is the challange. Thrue the scheduler and want to randomly pick one of those playlists to play that album
So i don't want to manually chose an album playlist, but i want to let proppfrexx chose one of the playlists in a folder.

I thought i create an media library which point to the directory with the playlists of the album, but there are no tracks found

Can anyone guide me to a solution how to solve this?

Thanx

Re: Load random playlist with script

Posted: 17 May 2014 21:20
by radio42
There is no direct support of this, but with a little trick it should be possible.

ProppFrexx supports so called embedded containers.
An embedded container is an entry which by itself contains a collection/list of tracks.
E.g. a playlist can be used as an embedded container entry within another playlist.
If defined that way the embedded container plays and acts like a single entry even though it is effectively a list or playlist by itself.
To define an embedded container you just right click in an empty playlist and select the "Add Embedded Playlist..." menu entry...
Do this for all your album playlist, so that your final playlist contains as many entry as you have album playlists.

To now implement the feature you are looking for you do the following:
First you need to create a special playlist. This playlist (as explained) now only contains your embedded containers - one for each album playlist.
Then you use this playlist as a media library. And then you can use this media lib in your script.
Whenever you pick a single random entry out of this media lib, you effectively select anembedded container which represents you album playlist. And which then plays the whole album as a single logical track.

I guess this exactly what you are looking for ...

Re: Load random playlist with script

Posted: 18 May 2014 12:29
by friso
Bernd
Thanx that looks logical to me. I will test it.
Expection is though that artist and track title will not be displayed in the stream?

Friso

Re: Load random playlist with script

Posted: 18 May 2014 15:30
by radio42
No there is also an option in the streaming settings to expand the embedded info for title updates.as such the individual contained track Info will be used.

Re: Load random playlist with script

Posted: 19 May 2014 09:04
by friso
Bernd

Thanx, that did the trick.
Another question that came across testing my script is, to not pick the palylist that are allready played till all playlist have played during the random choice.
How can i do this the best way.

Thanx
Friso

Re: Load random playlist with script

Posted: 19 May 2014 19:52
by radio42
When you say "...til all playlists have played..." this essentially playing your playlists sequentially ;-)
Just the very first play back sequence would be kind of random, but from then on it would always be exactly that same sequence - no random picks anymore!
I believe, that this is not exactly what you want?!

So the best way to use it like this is to have a history who's size is at least 3 or less than the overall number.
This to ensure a good blend between repeated items and random playback.
Note, that for this case you can use either a media or script history. When using a script history make sure, to use the strict checks, as for your embedded contains a relaxed check wouldn't make much sense.
Example:
- You have 50 albums-playlists in your media lib (as such 50 embedded media entries in your lib).
- Set the media lib history count to 45
- Set the following options in your script-line: SuppressHistoryCheck, SuppressAddHistory, ForceLibraryHistoryCheck

These script-line options will ensure, that no global or script history is used, but only the media lib history.
And a value of 45 out of 50 ensure, that only after 45 entries the same might be repeated. But as there is a delta of 5, there are still a few to pick randomly from, which gives you a slight variation.

However, if you really want to repeat the same initial sequence to be repeated, set the media history size to -1.

Re: Load random playlist with script

Posted: 21 May 2014 14:51
by friso
Bernd

Thanx.
It looks all is going ok, and playlists are working correct.
Thanx again for quick and good support ;)

Friso