XBMC Community Forum
Video Devil plugin status? - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Add-ons Help and Support (/forumdisplay.php?fid=27)
+---- Forum: Video Add-ons (/forumdisplay.php?fid=154)
+---- Thread: Video Devil plugin status? (/showthread.php?tid=58892)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24


- spiff - 2009-11-07 22:04

ty


- sonic - 2009-11-07 22:32

Thnx for the updates Smile


- ossman - 2009-11-21 23:06

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:youporn.com.cfg&url:http%3A%2F%2Fwww.youporn.com%2Fsearch%3Fquery%3D%25s

Help Confused


- ossman - 2009-11-22 00:22

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 - 2009-11-22 00:28

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

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.


- Bootsy - 2009-11-22 12:57

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

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


- ossman - 2009-11-25 23:11

Meh. Now even that code won't work. translatePath() no longer does anything useful.

I've added this to the top of the python file:

print os.getcwd(), sys.argv[0], xbmc.translatePath(sys.argv[0])

And the result is:

22:09:38 T:140168698771216 M:1761513472 NOTICE: /home/xbmc
22:09:38 T:140168698771216 M:1761513472 NOTICE: plugin://video/VideoDevil/
22:09:38 T:140168698771216 M:1761513472 NOTICE: plugin://video/VideoDevil/

Not exactly useful. :/


- dtviewer - 2009-12-02 01:25

Anything new on this?


- Bootsy - 2009-12-02 14:06

dtviewer Wrote:Anything new on this?

on what?
you have the same prob as ossman?

running good on my xbox and windows build...


greets


- ossman - 2009-12-03 19:36

Have you done any testing with the LiveCD?

I saw somewhere on the forum that cwd does differ between platforms. I don't know if this is considered a bug or if plugins simply shouldn't rely on this to determine their base directory.


- ossman - 2009-12-06 02:45

Ok, I've found some insight. First, the documented way of getting the script path is os.getcwd():

http://wiki.xbmc.org/?title=HOW-TO_write_Python_Scripts

Quote:
Code:
Root = os.getcwd().replace(";","")+"\\"

The Above line will return a folder so its like q:\\scripts\\GoogleScript\\ or where ever the script is located

However, this (and a lot of other XBMC voodoo) breaks if you use the system Python installation, which I was. There are a few threads on the issue, and the concensus seems to be that making things work with an external Python interpreter is a long term goal. Short term though, doing so will break a lot of scripts.

For Bootsy, you might want to check this thread for discussion on how to get the plugin path in a way that works even with an external Python:

http://forum.xbmc.org/showthread.php?tid=59208

For any non-developers, the current status is that the built-in interpreter is required and using the external one is a future feature (at least if you want all plugins and scripts to work).


- wemblystiggs - 2010-01-06 02:01

This is all working now, any chance of adding Xtube to the listConfused or gayforit


- lian - 2010-07-11 03:55

is there allready a version out what works with the new addon manager?



cheers
lian


- Djape - 2010-07-11 16:27

I'll stand in the line for addon also Big Grin

I knew I'm not the only perv in here Tongue


- lian - 2010-07-11 20:51

a general question about addons, is there somewhere a site what is listing all official and unofficial third party addons?



cheers

lian