2011-03-23, 21:09
doestergaard Wrote:Need a bit help here.
Is it possible to make the script run in hidden mode? For example. I just wanna browse and select a movie I would like to watch, and before it begins, the countdown feature shows.
More specific, what I want to do, is to just hit play as usual and then the script will run without having me to trigger it first.
Can this be done?
Thanks in advance.
There are a couple of options.
First off, which skin are you using?
I ask this because there are three skins that use the addon in a similar way that you are asking for. Aeon MQ2(Cinema Button), Transparency! SVN(development Version) and Night SVN(development version). Aeon MQ2 adds a Cinema button to the home menu, both Transparency! and Night have the option(in skin settings) to turn the Movies button into a full time Cinema Experience button. I also have mods for Confluence and MediaStream Redux available that also add a full time Cinema Experience button.
Using one of the above skins, when you activate from the Home Window(sub menu activation also works) the addon takes you to your Movies Library(instead of the Skin doing so) You should see a small Notification window displayed with the following intructions "Press 'Q' or '0'(ZERO) to Queue Movie(s)" Pressing either of these two will cause XBMC to queue up the movie. This is somewhat similar to how the script works from the Info Window. Now if you have the Feature Presentations settings on the addon set as default, the Addon will start. If you have the Feature Presentations set to more than 1, the script will wait until you have Queued the set amount of movies(and add intermission video between the movies if also set up.)
If you would like, you can edit your remote.xml in Userdata/Keymaps to add the play button to Queue, or pick another key that you want.
Another way, I believe is posted somewhere among these 100 messages. you can add the RunScript command to your keymap(attached to a button).
http://wiki.xbmc.org/index.php?title=Keymap.xml <- wiki page regarding the keymap file.
Here is the location you would need to add(found in remote.xml)
Code:
<MyVideoLibrary>
<remote>
<zero>Queue</zero>
<clear>Delete</clear>
</remote>
</MyVideoLibrary>
To add the play button that same area should look like this:
Code:
<MyVideoLibrary>
<remote>
<play>XBMC.RunScript(special://home/addons/script.cinema.experience/addon.py)</play>
<zero>Queue</zero>
<clear>Delete</clear>
</remote>
</MyVideoLibrary>
A word of warning though. The above code will also call the addon in any part of the Video Library(TV Shows, etc.) so it would be best to use a different button other than Play or Select(the common buttons).
I am working on capturing the Play and Select buttons for use with the addon, when starting from the Home window.