Video Devil plugin status?

  Thread Rating:
  • 3 Votes - 4.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
spiff Offline
Grumpy Bastard Developer
Posts: 12,179
Joined: Nov 2003
Reputation: 82
Post: #31
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.
find quote
sonic Offline
Member
Posts: 72
Joined: May 2004
Reputation: 0
Post: #32
Thnx for the updates Smile
find quote
ossman Offline
Junior Member
Posts: 43
Joined: Nov 2009
Reputation: 0
Location: Klockrike, Sweden
Post: #33
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
find quote
ossman Offline
Junior Member
Posts: 43
Joined: Nov 2009
Reputation: 0
Location: Klockrike, Sweden
Post: #34
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...
find quote
ossman Offline
Junior Member
Posts: 43
Joined: Nov 2009
Reputation: 0
Location: Klockrike, Sweden
Post: #35
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.
find quote
Bootsy Offline
Skilled Python Coder
Posts: 126
Joined: Nov 2005
Reputation: 1
Location: Germany
Post: #36
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
find quote
ossman Offline
Junior Member
Posts: 43
Joined: Nov 2009
Reputation: 0
Location: Klockrike, Sweden
Post: #37
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. :/
find quote
dtviewer Offline
Fan
Posts: 664
Joined: Jul 2008
Reputation: 1
Post: #38
Anything new on this?
find quote
Bootsy Offline
Skilled Python Coder
Posts: 126
Joined: Nov 2005
Reputation: 1
Location: Germany
Post: #39
dtviewer Wrote:Anything new on this?

on what?
you have the same prob as ossman?

running good on my xbox and windows build...


greets
find quote
ossman Offline
Junior Member
Posts: 43
Joined: Nov 2009
Reputation: 0
Location: Klockrike, Sweden
Post: #40
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.
find quote
Post Reply