Random sorting using script

Post Reply
MathieuM68
Posts: 5
Joined: Wed Feb 23, 2011 8:45 am

Random sorting using script

Post 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.
Eugene
Posts: 2940
Joined: Tue Nov 17, 2009 8:05 pm

Re: Random sorting using script

Post 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"
MathieuM68
Posts: 5
Joined: Wed Feb 23, 2011 8:45 am

Re: Random sorting using script

Post 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.
Eugene
Posts: 2940
Joined: Tue Nov 17, 2009 8:05 pm

Re: Random sorting using script

Post 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.
MathieuM68
Posts: 5
Joined: Wed Feb 23, 2011 8:45 am

Re: Random sorting using script

Post 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....
Eugene
Posts: 2940
Joined: Tue Nov 17, 2009 8:05 pm

Re: Random sorting using script

Post by Eugene »

Hi,

Settings - Processing - ...

Code: Select all

begin
  WmsFindMediaFolder('0').Properties[1234567] := Random;
  WmsDatabaseAutoSave 
end.
MathieuM68
Posts: 5
Joined: Wed Feb 23, 2011 8:45 am

Re: Random sorting using script

Post 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!
Eugene
Posts: 2940
Joined: Tue Nov 17, 2009 8:05 pm

Re: Random sorting using script

Post 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
MathieuM68
Posts: 5
Joined: Wed Feb 23, 2011 8:45 am

Re: Random sorting using script

Post by MathieuM68 »

Perfect! Thanks for your support!
Post Reply