XBMC Community Forum  

Go Back   XBMC Community Forum > Help and Support > Plugin/Script (Python) Help and Support

Plugin/Script (Python) Help and Support Python requests/suggestions, support, bugs, and everything python goes in here!
Please, add platform prefix to threads that are not platform-independent!:
Thread prefixes; "[LINUX]", "[LIVE]", "[MAC]", "[WINDOWS]", and "[XBOX]"

Reply
 
Thread Tools Search this Thread Display Modes
Old 2009-11-07, 22:04   #31
spiff
Grumpy Bastard Developer
 
spiff's Avatar
 
Join Date: Nov 2003
Posts: 7,715
spiff is on a distinguished road
Default

ty
__________________
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
spiff is offline   Reply With Quote
Old 2009-11-07, 22:32   #32
sonic
Member
 
Join Date: May 2004
Posts: 47
sonic is on a distinguished road
Default

Thnx for the updates
sonic is offline   Reply With Quote
Old Yesterday, 23:06   #33
ossman
Junior Member
 
Join Date: Nov 2009
Posts: 4
ossman is on a distinguished road
Default

I'm running the latest XBMC from svn on Linux, and I'm unable to get anything decent out of the plugins.

First off there is a problem with both VideoDevil and VideoMonkey assuming that the current directory is ~/.xbmc/plugins/video/VideoMonkey (or VideoDevil). This is basically never true, so the plugins normally fail to even start.

Starting xbmc in the correct directory makes that plugin work, but I can of course not be in two directories at once so only one plugin is usable.

Even when I do that hack, I don't get anything decent from the sources. Searching results in things like this:

21:58:32 T:139678154053824 M:1868312576 ERROR: GetDirectory - Error getting plugin://video/VideoDevil/?url=title: Search &type:search&icon:/home/xbmc/.xbmc/plugins/video/VideoDevil/resources/images/search.png&genre:YouPorn&director:VideoDevil&cfg:y ouporn.com.cfg&url:http%3A%2F%2Fwww.youporn.com%2F search%3Fquery%3D%25s

Help
ossman is offline   Reply With Quote
Old Today, 00:22   #34
ossman
Junior Member
 
Join Date: Nov 2009
Posts: 4
ossman is on a distinguished road
Default

Poking around in the code, the first problem is fairly obvious:

rootDir = os.getcwd()

Not good. I'm not sure what the proper way to do this is, but sys.argv[0] contains the "xbmc path" to the script, i.e. "plugin://video/VideoDevil/". Doing xbmc.translatePath() on that gives "special://home/plugins/video/VideoDevil/" and doing it again gives "/home/xbmc/.xbmc/plugins/video/VideoDevil/" which is finally something that can be used.

No idea about the second problem though...
ossman is offline   Reply With Quote
Old Today, 00:28   #35
ossman
Junior Member
 
Join Date: Nov 2009
Posts: 4
ossman is on a distinguished road
Default

Second problem was me being clumsy. I had the wrong permissions on the directory so the plugin couldn't write anything:

So adding these lines at the beginning of the scripts solves it for me:

rootDir = xbmc.translatePath(sys.argv[0])
rootDir = xbmc.translatePath(rootDir)

Hopefully that can lead you to a more proper solution.
ossman is offline   Reply With Quote
Old Today, 12:57   #36
Bootsy
Skilled Python Coder
 
Join Date: Nov 2005
Location: Germany
Posts: 80
Bootsy is on a distinguished road
Default

Quote:
Originally Posted by ossman View Post
Second problem was me being clumsy. I had the wrong permissions on the directory so the plugin couldn't write anything:

So adding these lines at the beginning of the scripts solves it for me:

rootDir = xbmc.translatePath(sys.argv[0])
rootDir = xbmc.translatePath(rootDir)

Hopefully that can lead you to a more proper solution.
can anyone confirm that?

greets
Bootsy is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 15:58.


Protected by Akismet, We recommend WordPress blogs
Copyright © 2008, XBMC Project