I would like to know if there is a way to have an icon on Kodi and when I select it with my remote control it executes a shell command. This shell command is synchronous and I would like to receive a notification when it completes. Consider that in the meanwhile I would like to still use KODI.
Is there a way to implement this in OSMC?
Thanks.
Yes, I did it some time ago with Retropie but I didn’t remember how. My SD card broken down and now I have a new one and for Retropie used the new Launch AddOn.
However, here what I need. I need to click on icon and launch a shell script. At the same time issue a pop up that command was received (this to prevent double click). Once the script complete a notification should be send.
I need this to a better management of my Photos where I use Flickrsmartsync to sync up my local folder with Flcikr.
I read the doc but I need exact steps, for example how to add the icon, how to associate the System.Exec command. What to put in the script to show the popup and what to put at the end of script to send notification of action completed.
Conceptually it’s clear but I need to put it in practice so I need real example.
Let me report the exact questions:
how I add an icon in Kodi so that I can click it and call System.Exec?
Where should I write the System.Exit call that calls my scripts?
Suppose my scripts executes N instructions, once it starts what I have to put in the top to send a message like this on KODI: “Flickr upload is started. You’ll be notified when the operation completes.” I need here a real example of code.
What code I have to put at the end to send a notification with JSONRPC.NotifyAll in the top right of the screen with a message like this “Flickr upload successfully completed.” or “Flickr upload failed.”
Probably here I need two plugin like the Retropie Launcher created by @mcobit, one for Flickr upload and another for download. The only difference is that I have to call a different script. Or I could create a single plugin that does both (for me more difficult).
If you can use the apis from python or bash, you could write a kodi plugin yourself that just does the calls and then quits from time to time.
Or a plugin that runs a bash script that does the stuff in the background (detached) while kodi runs. And then use kodi-send to localhost to do the notification when finished.