INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: MCC Command that Refreshes a Smartlist?  (Read 3422 times)

mashenden

  • Recent member
  • *
  • Posts: 39
MCC Command that Refreshes a Smartlist?
« on: February 19, 2012, 07:23:00 pm »

Is there a MCC Command that refreshes a Smartlist?

I realized that by loading a Not Recently Played Smartlist without refreshing, it eventually will play songs that have been played recently (Hi, Developers - another vote for an AutoRefresh option ;) ) I found a way to do it, but it seems a bit inefficient if there is a better way.

Code: [Select]
MC17.exe /MCC Command 21026, 715178384 ' Opens the Smartlist for Editing
MC17.exe /MCC Command 27000, 13 ' Sends a Keyboard Enter to refresh the Smartlist
MC17.exe /MCC Command 30007, 715178384 ' Loads the Smartlist into the Playlist and starts playing it.

Where 715178384 is my nPlaylistID for Smartlist "Not Recently Played", that I identified using the process noted in this link: http://yabb.jriver.com/interact/index.php?topic=10894.0.
Logged

mashenden

  • Recent member
  • *
  • Posts: 39
Re: MCC Command that Refreshes a Smartlist?
« Reply #1 on: February 28, 2012, 11:32:48 am »

I am a tad perplexed on this...

I really need to know the nPlaylist associated with my Smartlist called "Not Recently Played", so I can use it with MCC 30007.  Last week I tried the suggested approach in the noted link, but right clicking did not result in what was described.

The good news was that I was able to find it using Import/Export button. Unfortunately, today I tried to do the same thing but nPlaylist is no longer showing up when I select Import/Export. To the best of my knowledge, I am using the same release as a week ago, except I am now using it as a purchased copy instead of a trial.

Any ideas on either why this changed or more importantly how to reliably identify the nPlaylist so I can use it with MCC 30007?

Thank you in advance for any guidance .
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: MCC Command that Refreshes a Smartlist?
« Reply #2 on: February 28, 2012, 04:47:35 pm »

im on 16, but guess not much has changed there. and its not totally clear why it does not work, but i think you have a change checking out the other, not mcc, command options?
something like mc17.exe /play TREEPATH=Playlists\not recently played

you might need a second \..

btw.. i checked the wiki on this, and when it works, to get a better explanation check the history and pick an older one.. i dont get the recent one very well...
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: MCC Command that Refreshes a Smartlist?
« Reply #3 on: February 28, 2012, 05:14:27 pm »

im on 16, but guess not much has changed there. and its not totally clear why it does not work, but i think you have a change checking out the other, not mcc, command options?

Maybe:
17.0.87 (2/10/2012)

4. Fixed: Random smartlists would not refresh when re-entering a playlist view in Theater View.

Quote
btw.. i checked the wiki on this, and when it works, to get a better explanation check the history and pick an older one.. i dont get the recent one very well...

How about some suggestions as to what you want clarified, or is confusing?
Logged
The opinions I express represent my own folly.

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: MCC Command that Refreshes a Smartlist?
« Reply #4 on: February 28, 2012, 05:35:40 pm »

Maybe:
17.0.87 (2/10/2012)

4. Fixed: Random smartlists would not refresh when re-entering a playlist view in Theater View.
maybe.. i dont know, but the other commands have been always been useful besides the mcc commands. so it is worth a try. besides that, the op does not say a thing about thv. :) and the play TREEPATH makes sometimes more sense and is clearer then the id thing

How about some suggestions as to what you want clarified, or is confusing?
im sorry about this, because i know you are doing a lot there in wiki land, but, the old page shows fairly nicely how to do a /play, or /playreplace command, with a CLEAR example beside it... i just scrolled around, but i find the one off 4 september 2010 really clearer in the use of those commands.. :)
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: MCC Command that Refreshes a Smartlist?
« Reply #5 on: February 28, 2012, 05:57:48 pm »

You need a full TREELIST path, and case is relevant.  Eg:

  MC17.exe  /Play TREEPATH="Playlists\Smartlists\Not Recently Played"

I added a TREEPATH example (examples are at the end of the page).

The refresh occurs for me, so my guess probably wasn't relevant (to your MC16 test).
Logged
The opinions I express represent my own folly.

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: MCC Command that Refreshes a Smartlist?
« Reply #6 on: February 28, 2012, 06:04:29 pm »

You need a full TREELIST path, and case is relevant.  Eg:

  MC17.exe  /Play TREEPATH="Playlists\Smartlists\Not Recently Played"

I added a TREEPATH example (examples are at the end of the page).

The refresh occurs for me, so my guess probably wasn't relevant (to your MC16 test).
ofcourse you need the full path and stuff, so when the the smartlist resides under smartlists then yes..  ::)

and i did not test a thing..  8) just tried to help somebody who was hanging there, giving an other option to try that i know that works.
Logged

mashenden

  • Recent member
  • *
  • Posts: 39
Re: MCC Command that Refreshes a Smartlist?
« Reply #7 on: March 01, 2012, 07:07:22 am »

Thanks all for the ideas.

I was able to get the /Play TREEPATH approach working prior to figuring out which MCC commands accomplish the same or similar thing. With some help from MrC, I was able to figure out the right way to identifiy a nPlaylist ID. More on that was added to the related post at: http://yabb.jriver.com/interact/index.php?t.opic=10894.0 in case anyone is interested.

However, I really needed an MCC command solution so I could get a macro working properly.

I have been able to accomplish all that I need with only one area that is less than ideal. Because my approach requires a MCC 27000, 13 (Keyboard ENTER), the timing has to be just right. I put in a healthy delay after the MCC 21026, nPlaylist command and before the MCC 27000 command, which works 9 out of 10 times. The problem being that if the PC is in a screen save mode, it sometimes executes the Keyboard command before the Edit Playlist menu is opened. While a longer delay would probably solve this (already set to 6 secs), it represents a delay that is not often needed if the PC is not in a screen save.

Is there a way to do the equivalent of a WinWait command so that the MCC 27000 command waits until the appropriate window (Edit Playlist in this case) is definitely open?

Or back to the original question, is there a better way to refresh,  load, and play a Smartlist (comparable to /Play TREEPATH) using a different MCC command (that does not require a Keyboard ENTER)?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: MCC Command that Refreshes a Smartlist?
« Reply #8 on: March 01, 2012, 11:41:21 am »

Maybe I'm not seeing what you are seeing, or understanding the issue.

Each time I Play the smartlist Not Recently Played, the previously played items do not appear in the smartlist, and thus, don't appear when I send them to Playing Now.

They won't disappear from Playing Now, as Playing Now is just a playlist.

What you can do is resend the smartlist Not Recently Played to Playing Now, thus "removing" items played.  Use /Replace instead of /Play.
Logged
The opinions I express represent my own folly.

mashenden

  • Recent member
  • *
  • Posts: 39
Re: MCC Command that Refreshes a Smartlist?
« Reply #9 on: March 02, 2012, 06:48:23 am »

My apologies - I made it more complicated in trying to explain too many details.

In short, the /play and /replace commands work fine, but I need to be able to refresh, load and play the SmartList using a MCC ##### solution. To do this I am currently using the following:

Code: [Select]
WshShell.Run "MC17.exe /MCC 21026, 715178384 ' Opens the Smartlist for Editing
WScript.Sleep 6000
WshShell.Run "MC17.exe /MCC 27000, 13 ' Sends a Keyboard Enter to refresh the Smartlist
WScript.Sleep 2000
WshShell.Run "MC17.exe /MCC 30007, 715178384 ' Loads the Smartlist into the Playlist and starts playing it.

The problem being that sometimes the 21026 command takes longer that 6 seconds to open the Edit Smartlist if the PC is in some form of power saver mode or the CPU is busy doing other things. This, in turn, means the Keyboard ENTER command (27000) sometimes executes earlier than needed, which means that it does not accomplish the intent (refresh and close Edit Smartlist). I could further increase the delay but that means a notable delay each time, that is only needed on occasion (when PC is in power save or processor busy doing other things).

Therefore, I am looking for an alternate approach (using MCCs). One thought is whether there is a way to do the equivalent of a WinWait so that the Keyboard ENTER does not fire until the Edit Smartlist is definitely open. Alternately, I am wondering if there is another MCC command or commands to do this that  I am missing.

Logged

mashenden

  • Recent member
  • *
  • Posts: 39
Re: MCC Command that Refreshes a Smartlist?
« Reply #10 on: March 06, 2012, 12:22:41 pm »

...
Therefore, I am looking for an alternate approach (using MCCs). One thought is whether there is a way to do the equivalent of a WinWait so that the Keyboard ENTER (MCC 27000) command does not fire until the Edit Smartlist is definitely open. Alternately, I am wondering if there is another MCC command or commands to do this that  I am missing.


I hate bumping but I have to ask....  is it safe to assume that no response means no WinWait equivalent as well as no other MCC command exists that does the equivalent to /Play TREEPATH?
Logged

mashenden

  • Recent member
  • *
  • Posts: 39
Re: MCC Command that Refreshes a Smartlist?
« Reply #11 on: March 10, 2012, 12:03:59 pm »

I am having a heck of a time cracking this nut. The objective being to remotely refresh, load and the start playing the "Not Recently Played" Smartlist over the network from another PC using TouchControl (a remote control app that communicates to MC Server using HTTP GET - Sidebar: The TC Developer recommended MC to me).

Approaches tried:

  • MCC commands as noted above. This works 90% of the time, but if the MC Server PC is overly busy the Edit Smartlist does not refresh because the keyboard "Enter" sometimes executes too early.

  • /Play or  /Replace but I cannot get either to work over the network since I do not know how to structure them as a HTTP GET command.

  • I am now looking at the MCWS commands and have tried a slew but it is not clear to me which one would do the /Replace command or equivalent.


Any ideas?
Logged

SeldomSeen

  • Recent member
  • *
  • Posts: 48
Re: MCC Command that Refreshes a Smartlist?
« Reply #12 on: August 13, 2012, 02:18:58 pm »

I can't even seem to get a command to work that will consistently play a smartlist from the smartlist ID,

This command:

http://localhost:52199/MCWS/v1/Control/MCC?Command=30007, 967683289

seems to play whatever is currently loaded. 

I'd like to be able to refresh too, but just being able to play a given playlist would be nice. 

I've tried what you say has worked for you Mashenden, but am having no luck.

I'm a novice at this type of stuff so may be doing something wrong, I'm trying to use iRule which used HTTP Get, the basic play/pause, skip, etc commands all work fine.  I'd like to be able to directly have a button to play a couple of my really commonly used smartlists.

For reference, an easy way to get the playlist ID for all of your playlists is this:

http://localhost:52199/MCWS/v1/Playlists/List

My 4 and 5 stars playlist id is 967683289.  Any thoughts on how to get this to play from a command?

Thanks!
Logged

Lasse_Lus

  • Citizen of the Universe
  • *****
  • Posts: 999
Re: MCC Command that Refreshes a Smartlist?
« Reply #13 on: August 14, 2012, 07:24:20 am »

Quote from: SeldomSeen
http://localhost:52199/MCWS/v1/Control/MCC?Command=30007, 967683289

you need parameter as well

MCC?Command=30007&Parameter=967683289
Logged
MT5FR

SeldomSeen

  • Recent member
  • *
  • Posts: 48
Re: MCC Command that Refreshes a Smartlist?
« Reply #14 on: August 14, 2012, 10:04:52 am »

Thank you.  That did the trick.  I've added the parameter in to all 3 commands.  I can get it to work when executing each in succession via commands sent through iRule:

/MCWS/v1/Control/MCC?Command=21026&Parameter=967683289

/MCWS/v1/Control/MCC?Command=27000&Parameter=13

/MCWS/v1/Control/MCC?Command=30007&Parameter=967683289

Thank you very much!

Support here is always fantastic, so many knowledgeable folks with a willingness to help.

 
Logged
Pages: [1]   Go Up