Page 1 of 1

Random sorting using script

Posted: Thu Feb 24, 2011 9:12 am
by MathieuM68
Hi.

I wish to know if there is a way using Wild Media Server scripting to get folder random sort re-sorted?

I wish to get the folder 'All the music' with a random sort that changes every day.....


If somebody can help...

Thanks.

Re: Random sorting using script

Posted: Thu Feb 24, 2011 9:30 am
by Eugene
Hi,
MathieuM68 wrote: I wish to know if there is a way using Wild Media Server scripting to get folder random sort re-sorted?

I wish to get the folder 'All the music' with a random sort that changes every day.....


If somebody can help...
Folder "All Music" - right click - "Random order"

Re: Random sorting using script

Posted: Thu Feb 24, 2011 9:41 am
by MathieuM68
Hi.

Thanks for the answer, but my problem is that once I made this, the random order is always the same.
I mean :
If I have music A, B, and C
Then setup random order on all music folder.

If I connect using a client, I will get for example B, C and A
I re-connect again, still B,C and A
etc.
The order will never change, until I re-select manualy <Random Order> on the folder.

My goal is to automate this once per day....

Thanks.

Re: Random sorting using script

Posted: Thu Feb 24, 2011 9:46 am
by Eugene
Hi,
MathieuM68 wrote: Thanks for the answer, but my problem is that once I made this, the random order is always the same.
I mean :
If I have music A, B, and C
Then setup random order on all music folder.

If I connect using a client, I will get for example B, C and A
I re-connect again, still B,C and A
etc.
The order will never change, until I re-select manualy <Random Order> on the folder.
Service - Media database - Refresh Info ?

Shuffle is not stored, but the list can be cached, and server, and device.

Re: Random sorting using script

Posted: Thu Feb 24, 2011 9:51 am
by MathieuM68
Hi.

I've not tried this one, but my main concern is that I want this to be done automaticaly.

So, I was thinking about creating a script to will run once per day, and will do the stuff....

Re: Random sorting using script

Posted: Thu Feb 24, 2011 10:19 am
by Eugene
Hi,

Settings - Processing - ...

Code: Select all

begin
  WmsFindMediaFolder('0').Properties[1234567] := Random;
  WmsDatabaseAutoSave 
end.

Re: Random sorting using script

Posted: Thu Feb 24, 2011 10:34 am
by MathieuM68
Thanks a lot!!!!

I presume I must use this script as is, it will sort the 'All Music' folder?

And if I wish to do the same for the 'Favorites' folder, could you give me the related script?

Thanks!

Re: Random sorting using script

Posted: Thu Feb 24, 2011 10:38 am
by Eugene
MathieuM68 wrote:Thanks a lot!!!!

I presume I must use this script as is, it will sort the 'All Music' folder?

And if I wish to do the same for the 'Favorites' folder, could you give me the related script?

Thanks!
Just automation for "Service - Media database - Refresh Info" or Renew

Re: Random sorting using script

Posted: Thu Feb 24, 2011 10:48 am
by MathieuM68
Perfect! Thanks for your support!