Hello, JRiver!
Matt Wrote, on June 14: We'll add a IMJFieldsAutomation object when the UI redo slows down. (remind us then if you would)
I'll take that as a cue to share my big Automation Wishlist. I am doing an HTPC menu system that strongly depends on many of these new requests. I realize the new GUI stuff is still hot, but I want to get this list out there so that you already have it when the GUI work slows.
1. New property: CMJCurPlaylist.PreventDupesThis new read/write property takes three values:
0 - Duplicates OK (this is like PN always behaves today)
1 - Duplicates not allowed. If a duplicate item is being added to PN, it will replace the existing instance of it (effectively moving it to a new position).
2 - Duplicates not allowed. If a duplicate item is being added to PN, it will be ignored. The existing instance will not be moved.
2. Add parameter values to CMJFilesAutomation.Play() and CMJViewItemAutomation.DoCommand()This method already requires a parameter, but it currently has no effect. Please make this parameter distinguish between the variations of Play, such as Add (to beginning), Add (as next to play), Replace (shuffled), etc.
3. New variations of Play neededSome new variations of Play (that currently don't exist in the GUI), are strongly needed as well:
* Add (No dupes) - Adds the files, skipping any that are already in PN list
* Add (Shuffled, no dupes) - Same as above, but shuffles new files going in.
* Remove - Removes any instances of these files from the Playing Now list.
It would be great if these choices also exist in the GUI. The Remove option is especially important!! If you do #1 (the PreventDupes property), then I could live without the two new flavors of Add, but still need Remove.
4. Smartlist controlAs requested before, I need to be able to read and write smartlist definitions (query strings). If the smartlist being modified is the current basis of A View Filter (i.e. View menu/View Filter/Show Only or Hide), then changing the smartlist query string via Automation should affect the files returned by CMJSchemeAutomation.GetFiles() and CMJViewItemAutomation.GetFiles().
5. Add new method CMJFilesAutomation.SaveToDisk(filename)Write all the files in this collection to the given filename (as when saving a playlist via the menu command File / Export playlist. NOTE: I prefer to add this to CMJFilesAutomation instead of CMJPlaylistAutomation, so that you can do CMJAutomation.Search(), then call Sort(), then SaveToDisk(), to get a list based on arbitrary filter criteria, and without having to iterate through it myself, which is very slow (I am doing out-of-process calls via MCIO plugin).
6. Parameterize CMJFilesAutomation.Sort()This method should take an array of field names to sort upon, or a string containing delimited field names to sort upon.
7. Ability to set the current View FilterI suggest making a new CMJViewFilterAutomation object, with read/write properties that define the playlist filter for show and hide, as well as the boolean properties under this menu. I would like show and hide to accept arbitrary filter strings, but could work around it by setting it to a smartlist, then programmatically changing the smartlist filter (#4)
8. Add new method CMJCurPlaylistAutomation.Clear(n)This method clears the Playing now list. The parameter can be 0: all files, 1: leave playing file.
9. Add new method CMJCurPlaylistAutomation.GetFiles()This returns a CMJFilesAutomation collection containing the current contents of Playing Now. This, would be useful to allow one to do playingNow.GetFiles().Sort().Play(replace) sequence to re-sort the PN list using any sort criteria.
10. Need property to distinguish Playlist from Playlist GroupWhen iterating through the tree of Playlists, it is currently not directly possible to tell if a given CMJPlaylistAutomation object has children. This one is low priority for me, personally.
11. New method: CMJPlaylistAutomation.AddFiles(CMJFilesAutomation)Adds all the files in the given collection to the given static playlist, all at once.
12. New method: CMJPlaylistAutomation.Clear()Removes all files from the given static playlist.
13. New method CMJAutomation.SendKeys(string or integer)Sends the key keycode (integer) or string of characters to the application as if you had typed it. This is like the MCC_KEYSTROKE command. Basically, I think that anything you can do via MCC commands should also be possible via Automation (and visa versa, as much as feasible). SendKeys() strikes me as potentially very useful.
14. HairstyleFor now, I've implemented my own Hairstyle-like thing in JavaScript + DHTML, because Hairstyle is not flexible enough. To make Hairstyle great, it needs Automation support. Examples include: Jump directly to a node in Hairstyle tree, given a path. Control over which kind of Play (or DoCommand?) occurs when you select a node. Ability to add my own nodes to the tree which call a function in my code when selected, etc.
15. MiscAutomation SDK should provide a way to create and manage Scheduled events, TV tuner and recorder, line-in recording, multi-zone support, etc. I haven't thought about these as much, yet.
16. Allow out-of-process access to Automation SDKI use JHC's "Media Center Inside-Out" plugin for this, but is very slow at iterating through large collections (about 160/second on a 2.5GHz box).
ConclusionI realize this is quite a list, and I thank you for giving attention to this. I listed them roughly in order of my priority. I would say that #1-4 are critical for my current project, and #5-7 are "very important". I think many of these suggestions will be useful to others using the SDK, as well.
Thanks a million,
Howard