Trying to Play Playlist Automatically

Discussions for the iTunes Music Interface
sonypoolplr
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1490
Joined: Fri Mar 26, 2004 8:48 am
Location: New Jersey
Contact:

Trying to Play Playlist Automatically

Postby sonypoolplr » Sat Oct 25, 2008 8:09 pm

I am trying to get Mainlobby, MLServer and the iTunes plugin to load and play one on my playlists automatically. I can play the setup playlist from the iTunes pages, but isn't the main part of home automation the automation part? I am using the following command in mlserver:

Macro|MLITunes|001~ClearNowPlaying!MLITunes|1~AppendPlaylistNowPlaying~22

Where the 22 is the value of the playlist. I have also tried substituting Rob 1 which is the name of the playlist. Neither way works. Does someone have the correct syntax to play a command automatically?

Thanks.

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

Re: Trying to Play Playlist Automatically

Postby ronsatter » Sun Oct 26, 2008 12:50 am

sonypoolplr wrote:I am trying to get Mainlobby, MLServer and the iTunes plugin to load and play one on my playlists automatically. I can play the setup playlist from the iTunes pages, but isn't the main part of home automation the automation part? I am using the following command in mlserver:

Macro|MLITunes|001~ClearNowPlaying!MLITunes|1~AppendPlaylistNowPlaying~22

Where the 22 is the value of the playlist. I have also tried substituting Rob 1 which is the name of the playlist. Neither way works. Does someone have the correct syntax to play a command automatically?

Thanks.


I don't think the play commands work at all except for append/add to nowplaying. I've been trying to get these two commands to work:

MLServeCmd.MLITunes|1~PlayTrack~2
or
MLServeCmd.MLITunes|ITunes_One~PlayPlaylist~2

from the wiki (just subbed a different number for index)

No go ... tried variations of the index number and name ... nada.

The iTunes Agent is receiving the commands but the plugin is not responding.

EDIT: Try This for playing a playlist by name:

MLServeCmd.MLiTunes|{{{{clientname}}_Selected_ITunes}}~PlayPlaylist~The 80's

subbing your playlist name for "The 80's"

It works for me!

Ron :D
If it ain't broke ... don't fix it!

sonypoolplr
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1490
Joined: Fri Mar 26, 2004 8:48 am
Location: New Jersey
Contact:

Postby sonypoolplr » Sun Oct 26, 2008 8:27 am

Ron,
Thanks, that works for playing the playlist, but since nothing shows up in the Now Playing screen, I have no control over the playlist from Mainlobby. I can control it from iTunes itself but not ML. I don't know if this is because I am launching the command from MLServer and not from a client that I can't see the songs in Now Playing or not.

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

Postby ronsatter » Sun Oct 26, 2008 11:19 am

sonypoolplr wrote:Ron,
Thanks, that works for playing the playlist, but since nothing shows up in the Now Playing screen, I have no control over the playlist from Mainlobby. I can control it from iTunes itself but not ML. I don't know if this is because I am launching the command from MLServer and not from a client that I can't see the songs in Now Playing or not.


There is a command listed in the wiki that is supposed to add a playlist (designated by name) to the nowplaying list AND start playing it immediately:

MLServeCmd.MLITunes|ITunes_One~AddPlaylistNowPlayingNow~My Playlist

It doesn't work as listed. No surprise ... Public Beta is still beta. I think it just a correct syntax problem, but I haven't stumbled on to the magic combination as yet.

Is anyone else working on this?


Ron
If it ain't broke ... don't fix it!

User avatar
mcascio
Founder
Founder
Posts: 8270
Joined: Tue Jan 28, 2003 4:03 pm
Location: Kenosha, Wi
Contact:

Postby mcascio » Wed Nov 05, 2008 10:49 am

With the latest versions, this did work for me.
Mario Cascio
Cinemar, Inc.
http://www.cinemaronline.com

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

Postby ronsatter » Wed Nov 05, 2008 6:39 pm

mcascio wrote:With the latest versions, this did work for me.


Hi Mario,

I did get this command to work for me:
MLServeCmd.MLITunes|ITunes_One~AddPlaylistNowPlayingNow~My Playlist

but only after I changed the syntax to this:
MLServeCmd.MLiTunes|{{{{clientname}}_Selected_ITunes}}~AddPlaylistNowPlayingNow~My Playlist


Not a big deal, but maybe the wiki should list this as working syntax.

I notice a couple of problems with playing a playlist using this method:

1. The load time for a playlist with a 1000 tracks is around 90 secs, depending on what MLServer is doing at the time the command is issued. True, it does start playing the first track in the list immediately ... and then starts building the list in the backgroud (you can see the "track count total" and "page count total" variables incrementing in the background). That would not be a problem except the load process must be completed before any more commands in a macro can be executed.

2. The selected playlist always starts with the same track first. I have not been able to build a macro to execute an automatic playlist shuffle BEFORE the first track is played. You may recall JR River Media requires some macro "razzle dazzle" to accomplish this also. I tried leaving the iTunes Agent "Shuffle List" command checked while loading the playlist, but it does not shuffle automatically. You need to manually toggle the shuffle command to "Off" then "On" before the playlist can be shuffled, and ONLY after the entire list has been loaded into "Now Playing". I suppose you could use a MLPause command with a 90 sec delay to wait to trigger the "Shuffle Toggle" ... also would need a MLConditional to read the state of the "Shuffle" toggle. I personally don't think it should require all the extra work.

Can we just get the plugin to play a selected playlist with it automatically shuffled to start on a different track every time, and show the shuffled tracks in the "Now Playing" list?

By the way ...

I experimented with this command:

MLServeCmd.MLiTunes|{{{{clientname}}_Selected_ITunes}}~PlayPlaylist~myPlaylist

and discovered that it you execute a macro like this:

Macro|
MLITunes|{{{{clientname}}_Selected_ITunes}}~Stop!
MLiTunes|{{{{clientname}}_Selected_ITunes}}~PlayPlaylist~myPlaylist!

It will start the playlist on a different song every time and if you turn shuffle on from within the iTunes app directly, not through the agent ... it will always shuffle the playlist before starting. The downside is no preview/control in MLClient of the playlist tracks in Now Playing scene. This is quick and clean. So I just built a custom scene to display the currently playing track info. It updates with every track change. The scene lives in layer 3 which allows me to navigate to other scenes and still display the current playing track info and control track play within the list at all times. See screenshot.


Thanks,

Ron
You do not have the required permissions to view the files attached to this post.
If it ain't broke ... don't fix it!


Return to “iTunes”

Who is online

Users browsing this forum: No registered users and 1 guest