System.Exec
#1
Hi,

I've configured Kodi to use an external video player because I want to stream videos to my Google Chromecast instead of local playback on my computer. In order to do so I've created a "playercorefactory.xml" file in the userdata directory which works flawlesly. The problem however is that I want to remap the controls (play, pause, stop, etc.) to custom actions in order to control the stream, I first want to test this on my computer, but the final step will be to install Kore on my smartphone and to use it as a remote. Therefor I've created 2 custom files: "appcommand.xml" and "remote.xml" in userdata\keymaps, which contain following information:

appcommand.xml
xml:

<keymap>
<global>
<appcommand>
<browser_back>Back</browser_back>
<browser_forward/>
<browser_refresh/>
<browser_stop>Stop</browser_stop>
<browser_search/>
<browser_favorites>ActivateWindow(Favourites)</browser_favorites>
<browser_home>FirstPage</browser_home>
<volume_mute/>
<volume_down/>
<volume_up/>
<next_track>SkipNext</next_track>
<prev_track>System.Exec('F:\Tools\go-chromecast\go-chromecast.exe -n "Woonkamer" rewind 30')</prev_track>
<stop>System.Exec('F:\Tools\go-chromecast\go-chromecast.exe -n "Woonkamer" stop')</stop>
<play_pause>PlayPause</play_pause>
<launch_mail/>
<launch_media_select>ActivateWindow(Music)</launch_media_select>
<launch_app1>ActivateWindow(Programs)</launch_app1>
<launch_app2>ActivateWindow(Programs)</launch_app2>
<play>System.Exec('F:\Tools\go-chromecast\go-chromecast.exe -n "Woonkamer" unpause')</play>
<pause>System.Exec('F:\Tools\go-chromecast\go-chromecast.exe -n "Woonkamer" pause')</pause>
<fastforward>FastForward</fastforward>
<rewind>System.Exec('F:\Tools\go-chromecast\go-chromecast.exe -n "Woonkamer" rewind 30')</rewind>
<channelup>PageUp</channelup>
<channeldown>PageDown</channeldown>
</appcommand>
</global>
</keymap>

remote.xml
xml:

<keymap>
<global>
<remote>
<play>System.Exec('F:\Tools\go-chromecast\go-chromecast.exe -n "Woonkamer" unpause')</play>
<pause>ystem.Exec('F:\Tools\go-chromecast\go-chromecast.exe -n "Woonkamer" pause')</pause>
<stop>System.Exec('F:\Tools\go-chromecast\go-chromecast.exe -n "Woonkamer" stop')</stop>
<reverse>System.Exec('F:\Tools\go-chromecast\go-chromecast.exe -n "Woonkamer" rewind 30')</reverse>
<skipminus>System.Exec('F:\Tools\go-chromecast\go-chromecast.exe -n "Woonkamer" rewind 30')</skipminus>
[other data omited]
</remote>
</global>
</keymap>

Unfortunately it doens't work. I've tested the commands separately in a command prompt and then they work. Does anyone have an idea what might go wrong? Does the System.Exec method still exist? Are there alternatives?

Thanks in advance!
Reply

Logout Mark Read Team Forum Stats Members Help
System.Exec0