Kodi Community Forum
[Linux] Help to start writing a simple script. - Printable Version

+- Kodi Community Forum (http://forum.kodi.tv)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Python Add-on Development (/forumdisplay.php?fid=26)
+--- Thread: [Linux] Help to start writing a simple script. (/showthread.php?tid=127318)



Help to start writing a simple script. - zidz - 2012-03-31 17:21

I want to create a simple script/addon and need a little help to start.
When listing movies/series episode I want to be able to press a hotkey and handle the files associated the the movie/series episode with a script.

May any of you show me an example where I may begin?

//Christoffer


RE: Help to start writing a simple script. - Bstrdsmkr - 2012-03-31 18:12

Are you talking about a python addon or a Linux bash script or a python script to be ran outside xbmc?


RE: Help to start writing a simple script. - zidz - 2012-04-02 15:15

It could be either Python or Bash, i Mastered them both Smile
The script should handle the movie that's highligted in XBMC, and it will run for examle cp to copy movie from source to destination.


RE: Help to start writing a simple script. - Bstrdsmkr - 2012-04-03 00:54

You probably want to do this one in python as a service addon. I don't think you can get the currently selected item in xbmc from bash. What I'm not sure about is capturing key input for the hotkey part.

Once you've got that part, you can call the JSONRPC from within python to get the info about the selected item and do as you wish with it.