2016-01-06, 23:35
Hi,
Apologies if this has been covered before, I am unable to find relevant information.
I would like to execute a bash script from a kodi plugin. I have 7 bash scripts, each one triggers a different set of xdotool commands on another ubuntu dekstop "changing channel" essentially. The entire desktop (on the ubuntu machine) is captured by Open Broadcaster Software and sent to my HTPC which has an nginx instance running on it. This allows me to have an rtmp://192.168.1.103/live/stream running from the nginx server on localhost. So, my bash scripts choose the channel, and that one stream allows me to view the channels. I will not elaborate on the reasons for this complicated approach unless anybody is interested. This is how it has to be, however.
I used advanced launcher to achieve this previously, but alas, Angelscry has taken down all the repos for his work. Advanced laucnher is no more, it seems.
I am a novice programmer, forgive me.
I have tried to use this to try and decipher this stuff, and I have completed 40% of the codeacademy python tutorial, so I figured I would give it a bash, but I didn't get very far. This is most likely due to me not being good enough, so I am asking for help.
I got this far:
..but that only plays the rtmp link. I want something that executes a bash script instead of playing a file. My bash files contain json commands to play the rtmp link by means of a .strm file.
What do i do to get this right? How far off am I?
Any help would be appreciated. Even just a string for me to google would be appreciated.
Apologies if this has been covered before, I am unable to find relevant information.
I would like to execute a bash script from a kodi plugin. I have 7 bash scripts, each one triggers a different set of xdotool commands on another ubuntu dekstop "changing channel" essentially. The entire desktop (on the ubuntu machine) is captured by Open Broadcaster Software and sent to my HTPC which has an nginx instance running on it. This allows me to have an rtmp://192.168.1.103/live/stream running from the nginx server on localhost. So, my bash scripts choose the channel, and that one stream allows me to view the channels. I will not elaborate on the reasons for this complicated approach unless anybody is interested. This is how it has to be, however.
I used advanced launcher to achieve this previously, but alas, Angelscry has taken down all the repos for his work. Advanced laucnher is no more, it seems.
I am a novice programmer, forgive me.
I have tried to use this to try and decipher this stuff, and I have completed 40% of the codeacademy python tutorial, so I figured I would give it a bash, but I didn't get very far. This is most likely due to me not being good enough, so I am asking for help.
I got this far:
Code:
import sys
import xbmcgui
import xbmcplugin
addon_handle = int(sys.argv[1])
xbmcplugin.setContent(addon_handle, 'movies')
url = 'rtmp://192.168.1.103/live/test'
li = xbmcgui.ListItem('SuperSport 1', iconImage='/home/mark/.kodi/addons/plugin.video.example-master/resources/images/SuperSport_HD.png')
xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)
xbmcplugin.endOfDirectory(addon_handle)
..but that only plays the rtmp link. I want something that executes a bash script instead of playing a file. My bash files contain json commands to play the rtmp link by means of a .strm file.
What do i do to get this right? How far off am I?
Any help would be appreciated. Even just a string for me to google would be appreciated.