INTERACT FORUM

More => Old Versions => Media Center 11 (Development Ended) => Topic started by: AndromAK on July 17, 2005, 02:59:27 pm

Title: Add a Playlist (or Smarlist) from command line
Post by: AndromAK on July 17, 2005, 02:59:27 pm
I would like to add a smartlist (or playlist) from the command line, and want to add it in Playing Now just after the current track ("play next")

I didn't find how to do that in the existing command line parameters (http://www.jrmediacenter.com/DevZone/CommandLine.html)

I want to do that to make Media scheduler adding tracks that have [Number plays] field equals to 0 each day at a specific hour, without having to do anything by myself...

Is it possible?

Thanks.
Title: Re: Add a Playlist (or Smarlist) from command line
Post by: hsc on July 18, 2005, 10:38:38 am
If I understood your request correctly the following steps should nearly lead to what you want:

(1) Setup a smarlist, e.g
  Media Type: Audio   Number Plays:=0   Limit: 60 Minutes
  In my test I made a Playlistgroup called "Test" and the above as smartlist "NotPlayedBefore"

(2) the commands (e.g. in a dosbox):
  mc11 /clear DontRemoveCurrent
  mc11 /Append TREEPATH=Playlists\Test\NotPlayedBefore
adds some additional tracks after the currently played track to Playing Now

I tested this with MC11 (build 298).
Title: Re: Add a Playlist (or Smarlist) from command line
Post by: AndromAK on July 18, 2005, 11:56:33 am
Thank you for your answer.

This works fine, but all the playlist is cleared.

I wonder if it is possible to do the same thing, but keeping tracks of the previous playlist

..as it does when I double-click a playlist with:
Options/General/Behaviour/Double-Click is set to Add to PlayingNow (Playing next)

Thank you anyway.
Title: Re: Add a Playlist (or Smarlist) from command line
Post by: hsc on July 18, 2005, 12:48:23 pm
I thought, that you would like to keep the playlist content, thats why I said "nearly" 8). But I guess thats not possible with just using the commandline/smartlist combination.
On the other hand it will be pretty easy to do this with the Media Center Interface SDK
http://www.jrmediacenter.com/DevZone/MJAutomation.html with only a few lines C++ or VB to create a "out of proc" standalone exe.