Linux - Help to start writing a simple script.

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
zidz Offline
Junior Member
Posts: 3
Joined: Feb 2012
Reputation: 0
Post: #1
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
find quote
Bstrdsmkr Offline
Posting Freak
Posts: 803
Joined: Oct 2010
Reputation: 17
Post: #2
Are you talking about a python addon or a Linux bash script or a python script to be ran outside xbmc?
find quote
zidz Offline
Junior Member
Posts: 3
Joined: Feb 2012
Reputation: 0
Post: #3
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.
(This post was last modified: 2012-04-02 15:16 by zidz.)
find quote
Bstrdsmkr Offline
Posting Freak
Posts: 803
Joined: Oct 2010
Reputation: 17
Post: #4
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.
find quote