Jumpy: Jump into Python (and onto XBMC) Updated 22 Sep 2012

Discuss third-party additions, plugins and translations for PS3 Media Server

Re: PMS-Jumpy - Jump into Python (and onto XBMC)

Postby rocco24 » Tue Dec 20, 2011 7:26 pm

infidel wrote:Glad it sorted itself out :)!

There's no connection between jumpy and the xbmc program itself and you can't influence anything inside jumpy (i.e. what you see on the PS3) from xbmc. Jumpy is just running the addon scripts independently and it makes no difference if xbmc itself is present.

That's what I figured. Thank you so much for your time and your efficient help.
rocco24
 
Posts: 21
Joined: Sun Dec 11, 2011 11:28 pm

Re: PMS-Jumpy - Jump into Python (and onto XBMC)

Postby Eclectic » Tue Dec 20, 2011 9:43 pm

Hi there, excellent idea Infidel. Though I have a question.

I have a server running headless with PS3MS on it. Now, Id very much like some of the plug-ins to work, but do I really have to run XBMC? Is there any way I can have the plugins load from PS3MS exclusively? If its just a case of configuring XMBC to run once only I can get in the cupboard and hook a monitor, but I dont want to go through the trouble if XBMC has to be run alongside PS3MS at all times. Annoyingly XBMC wont run via RDP.

Thanks in advance.
Eclectic
 
Posts: 2
Joined: Tue Dec 20, 2011 9:38 pm

Re: PMS-Jumpy - Jump into Python (and onto XBMC)

Postby infidel » Tue Dec 20, 2011 10:17 pm

No xbmc required, just a copy of the xbmc user directory (which contains the addons and everything else jumpy needs):

  • Linux: $HOME/.xbmc/
  • Windows XP: Documents and Settings\<your_user_name>\Application Data\XBMC\
  • Vista/Windows 7: Users\<your_user_name>\AppData\Roaming\XBMC\
  • Mac OS X: /Users/<your_user_name>/Library/Application Support/XBMC/
  • iOS: /private/var/mobile/Library/Preferences/XBMC/

xbmc itself is optional :), I recommend having it so as to manage the plugins (and their dependencies) easily but you could just as soon have a remote xbmc installation and then keep a synced copy of its user dir on your headless setup, or you could even do it all manually if you like.
infidel
 
Posts: 278
Joined: Sun Aug 15, 2010 4:56 pm

Re: PMS-Jumpy - Jump into Python (and onto XBMC)

Postby Eclectic » Wed Dec 21, 2011 6:33 pm

Excellent, thanks for the advice. Makes perfect sence to run xbmc on this box then sync it!

Thanks again!

Edit, after configuring XBMC on this box and running some add-ons. I then copied the folder to the box (running WHS2011 with PS3MS running as a service) overwriting the XBMC folder already present in %appdata%/roaming. I then restarted the PS3MS service and fired up the PS3.

Now, whilst the jumpy folder is still present with the hello folder intact complete with 5 x 9.59min long files spelling world. Is it worth mentioning none of these W, O, R, L, D files play - corrupt data?. But alas, nothing else shows up in the jumpy folder and nothing extra appears anywhere else. Any clues?
Eclectic
 
Posts: 2
Joined: Tue Dec 20, 2011 9:38 pm

Re: PMS-Jumpy - Jump into Python (and onto XBMC)

Postby infidel » Wed Dec 21, 2011 9:40 pm

Eclectic wrote:none of these W, O, R, L, D files play - corrupt data?

No, non-existent data :). The demo just shows how the menus work for anyone interested in writing their own scripts.

Eclectic wrote:XBMC folder already present in %appdata%/roaming

Jumpy uses python's sys module to identify the platform, and may or may not have an issue with identifying Windows Home Server. The relevant code is in jumpy\xbmc\xbmcinit.py:

Code: Select all
   elif platform.startswith('win32'):
      _special['home'] = os.getenv('APPDATA') + '\\XBMC'

You can hack this to force execution of this conditional:

Code: Select all
   elif True:
      _special['home'] = os.getenv('APPDATA') + '\\XBMC'


and make sure your XBMC folder is wherever %appdata%\XBMC works out to be on your server. If you want to check what python thinks the os is, open a python console (execute python.exe) and see what you get as output after these 2 commands:

Code: Select all
>>> import sys
>>> print sys.platform

and if it doesn't start with 'win32' I can add another test to xbmcinit.py to cover the situation.
infidel
 
Posts: 278
Joined: Sun Aug 15, 2010 4:56 pm

Re: PMS-Jumpy - Jump into Python (and onto XBMC)

Postby rocco24 » Sun Dec 25, 2011 7:39 pm

Something weird happening to my Jumpy folder. After a fresh install I can see it with all my add-ons, However if I reboot my PC or PS3 or even PMS Jumpy folder is gone and it only comes back up when I do a fresh install of the SBH package. Can someone advise ?
rocco24
 
Posts: 21
Joined: Sun Dec 11, 2011 11:28 pm

Re: PMS-Jumpy - Jump into Python (and onto XBMC)

Postby infidel » Mon Dec 26, 2011 3:22 pm

Apologies if this is too elementary, but check if the rebooted non-jumpy PMS is SHB. If you have multiple versions of PMS the previous version may be loading instead of SHB.

PS I'm about to leave for a couple of days and will be offline.
infidel
 
Posts: 278
Joined: Sun Aug 15, 2010 4:56 pm

Re: PMS-Jumpy - Jump into Python (and onto XBMC)

Postby rocco24 » Tue Dec 27, 2011 6:06 pm

infidel wrote:Apologies if this is too elementary, but check if the rebooted non-jumpy PMS is SHB. If you have multiple versions of PMS the previous version may be loading instead of SHB.

PS I'm about to leave for a couple of days and will be offline.

No worries take your time. I already uninstalled the previous version of PMS so I don't think I have this issue.
rocco24
 
Posts: 21
Joined: Sun Dec 11, 2011 11:28 pm

Need help with Linux implementation

Postby tmknight » Wed Dec 28, 2011 5:15 pm

OK, need some LINUX help, I'm clearly missing something, I keep getting a permission denied error. I've opened the permissions to 777 where I thought they were relevant. I'm running headless with a "service account". FWIW, my end-goal is to get the HULU plugin to work. I'm running latest SubJunk Build; I do not have xbmc installed, I merely created the directory structure under the service account home:

debug.log:
Code: Select all
main] INFO  11:03:03.688 Found plugin: net.pms.external.infidel.jumpy
[main] INFO  11:03:03.698 jumpy: initializing jumpy 0.1.3
[main] INFO  11:03:03.699 jumpy: home=/usr/lib/ps3mediaserver/plugins/jumpy/
[main] INFO  11:03:03.699 jumpy: python=/usr/lib/python3.2
[main] INFO  11:03:03.699 jumpy: pypath=/usr/lib/ps3mediaserver/plugins/jumpy/lib
[main] INFO  11:03:03.700 jumpy: Found 2 scripts.
[main] INFO  11:03:03.711 jumpy: adding root folder.
[main] INFO  11:03:03.712 jumpy: loading helloworld.py.
[main] INFO  11:03:03.732 java.io.IOException: Cannot run program "/usr/lib/python3.2" (in directory "/usr/lib/ps3mediaserver/plugins/jumpy"): java.io.IOException: error=13, Permission denied
[main] INFO  11:03:03.733    at java.lang.ProcessBuilder.start(Unknown Source)
[main] INFO  11:03:03.733    at net.pms.external.infidel.py.run(Unknown Source)
[main] INFO  11:03:03.733    at net.pms.external.infidel.jumpy.<init>(Unknown Source)
[main] INFO  11:03:03.733    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[main] INFO  11:03:03.733    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
[main] INFO  11:03:03.733    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
[main] INFO  11:03:03.734    at java.lang.reflect.Constructor.newInstance(Unknown Source)
[main] INFO  11:03:03.734    at java.lang.Class.newInstance0(Unknown Source)
[main] INFO  11:03:03.734    at java.lang.Class.newInstance(Unknown Source)
[main] INFO  11:03:03.734    at net.pms.external.ExternalFactory.lookup(ExternalFactory.java:98)
[main] INFO  11:03:03.734    at net.pms.PMS.init(PMS.java:491)
[main] INFO  11:03:03.734    at net.pms.PMS.createInstance(PMS.java:914)
[main] INFO  11:03:03.734    at net.pms.PMS.main(PMS.java:1008)
[main] INFO  11:03:03.734 Caused by: java.io.IOException: java.io.IOException: error=13, Permission denied
[main] INFO  11:03:03.735    at java.lang.UNIXProcess.<init>(Unknown Source)
[main] INFO  11:03:03.735    at java.lang.ProcessImpl.start(Unknown Source)
[main] INFO  11:03:03.735    ... 13 more
[main] INFO  11:03:03.735 jumpy: loading xbmc.py.
[main] INFO  11:03:03.738 java.io.IOException: Cannot run program "/usr/lib/python3.2" (in directory "/usr/lib/ps3mediaserver/plugins/jumpy"): java.io.IOException: error=13, Permission denied
[main] INFO  11:03:03.738    at java.lang.ProcessBuilder.start(Unknown Source)
[main] INFO  11:03:03.739    at net.pms.external.infidel.py.run(Unknown Source)
[main] INFO  11:03:03.739    at net.pms.external.infidel.jumpy.<init>(Unknown Source)
[main] INFO  11:03:03.739    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[main] INFO  11:03:03.739    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
[main] INFO  11:03:03.739    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
[main] INFO  11:03:03.739    at java.lang.reflect.Constructor.newInstance(Unknown Source)
[main] INFO  11:03:03.739    at java.lang.Class.newInstance0(Unknown Source)
[main] INFO  11:03:03.739    at java.lang.Class.newInstance(Unknown Source)
[main] INFO  11:03:03.740    at net.pms.external.ExternalFactory.lookup(ExternalFactory.java:98)
[main] INFO  11:03:03.740    at net.pms.PMS.init(PMS.java:491)
[main] INFO  11:03:03.740    at net.pms.PMS.createInstance(PMS.java:914)
[main] INFO  11:03:03.740    at net.pms.PMS.main(PMS.java:1008)
[main] INFO  11:03:03.740 Caused by: java.io.IOException: java.io.IOException: error=13, Permission denied
[main] INFO  11:03:03.740    at java.lang.UNIXProcess.<init>(Unknown Source)
[main] INFO  11:03:03.740    at java.lang.ProcessImpl.start(Unknown Source)
[main] INFO  11:03:03.740    ... 13 more

jumpy.log:
Code: Select all
[jumpy] initializing jumpy 0.1.3
[jumpy] home=/usr/lib/ps3mediaserver/plugins/jumpy/
[jumpy] python=/usr/lib/python3.2
[jumpy] pypath=/usr/lib/ps3mediaserver/plugins/jumpy/lib
[jumpy] Found 2 scripts.

[jumpy] adding root folder.

[jumpy] loading helloworld.py.

Running [/usr/lib/python3.2, /usr/lib/ps3mediaserver/plugins/jumpy/helloworld.py]
PYTHONPATH=/usr/lib/ps3mediaserver/plugins/jumpy/lib
JGATEWAY=127.0.1.1:25333


[jumpy] loading xbmc.py.

Running [/usr/lib/python3.2, /usr/lib/ps3mediaserver/plugins/jumpy/xbmc.py]
PYTHONPATH=/usr/lib/ps3mediaserver/plugins/jumpy/lib
JGATEWAY=127.0.1.1:25334

jumpy permissions:
Code: Select all
ls -lR /usr/lib/ps3mediaserver/plugins/jumpy
/usr/lib/ps3mediaserver/plugins/jumpy:
total 36
-rwxrwxrwx 1 root      media_svc  450 2011-12-28 09:14 helloworld.py
-rwxrwxrwx 1 root      media_svc  121 2011-12-28 09:14 jumpstart
-rwxrwxrwx 1 root      media_svc  312 2011-12-28 09:14 jumpstart.bat
-rwxrwxrwx 1 media_svc media_svc  606 2011-12-28 11:03 jumpy.log
drwxrwxrwx 2 root      media_svc 4096 2011-12-28 09:14 lib
-rwxrwxrwx 1 root      media_svc 6167 2011-12-28 09:14 readme.html
drwxrwxrwx 2 root      media_svc 4096 2011-12-28 09:14 xbmc
-rwxrwxrwx 1 root      media_svc 1239 2011-12-28 09:14 xbmc.py

/usr/lib/ps3mediaserver/plugins/jumpy/lib:
total 108
-rwxrwxrwx 1 root media_svc  6713 2011-12-28 09:14 jumpstart.jar
-rwxrwxrwx 1 root media_svc  1068 2011-12-28 09:14 jumpy.py
-rwxrwxrwx 1 root media_svc 94619 2011-12-28 09:14 py4j0.7.jar

/usr/lib/ps3mediaserver/plugins/jumpy/xbmc:
total 32
-rwxrwxrwx 1 root media_svc    0 2011-12-28 09:14 __init__.py
-rwxrwxrwx 1 root media_svc 1343 2011-12-28 09:14 xbmcaddon.py
-rwxrwxrwx 1 root media_svc 3859 2011-12-28 09:14 xbmcgui.py
-rwxrwxrwx 1 root media_svc 3263 2011-12-28 09:14 xbmcinit.py
-rwxrwxrwx 1 root media_svc 7171 2011-12-28 09:14 xbmcplugin.py
-rwxrwxrwx 1 root media_svc 8432 2011-12-28 09:14 xbmc.py

xbmc permissions:
Code: Select all
ls -lR /home/media_svc/.xbmc
/home/media_svc/.xbmc:
total 8
drwxrwxrwx 3 media_svc media_svc 4096 2011-12-28 09:36 plugins
drwxrwxrwx 3 media_svc media_svc 4096 2011-12-28 11:02 userdata

/home/media_svc/.xbmc/plugins:
total 4
drwxrwxrwx 3 media_svc media_svc 4096 2011-12-28 09:36 video

/home/media_svc/.xbmc/plugins/video:
total 4
drwxrwxrwx 3 media_svc media_svc 4096 2011-12-28 09:38 hulu

/home/media_svc/.xbmc/plugins/video/hulu:
total 104
-rwxrwxrwx 1 media_svc media_svc   783 2011-12-28 09:38 addon.xml
-rwxrwxrwx 1 media_svc media_svc  2052 2011-12-28 09:38 BUILD.BAT
-rwxrwxrwx 1 media_svc media_svc  1632 2011-12-28 09:38 default.py
-rwxrwxrwx 1 media_svc media_svc 84536 2011-12-28 09:38 default.tbn
-rwxrwxrwx 1 media_svc media_svc   583 2011-12-28 09:38 readme.txt
drwxrwxrwx 5 media_svc media_svc  4096 2011-12-28 09:38 resources

/home/media_svc/.xbmc/plugins/video/hulu/resources:
total 20
drwxrwxrwx 2 media_svc media_svc 4096 2011-12-28 09:38 images
-rwxrwxrwx 1 media_svc media_svc   47 2011-12-28 09:38 __init__.py
drwxrwxrwx 5 media_svc media_svc 4096 2011-12-28 09:38 language
drwxrwxrwx 2 media_svc media_svc 4096 2011-12-28 09:38 lib
-rwxrwxrwx 1 media_svc media_svc 1343 2011-12-28 09:38 settings.xml

/home/media_svc/.xbmc/plugins/video/hulu/resources/images:
total 356
-rwxrwxrwx 1 media_svc media_svc  18931 2011-12-28 09:38 hd_icon.png
-rwxrwxrwx 1 media_svc media_svc  84536 2011-12-28 09:38 hulu_icon.png
-rwxrwxrwx 1 media_svc media_svc  45662 2011-12-28 09:38 movie_icon.png
-rwxrwxrwx 1 media_svc media_svc  50770 2011-12-28 09:38 rss_icon.png
-rwxrwxrwx 1 media_svc media_svc  41374 2011-12-28 09:38 search_icon.png
-rwxrwxrwx 1 media_svc media_svc 107413 2011-12-28 09:38 tv_icon.png

/home/media_svc/.xbmc/plugins/video/hulu/resources/language:
total 12
drwxrwxrwx 2 media_svc media_svc 4096 2011-12-28 09:38 English
drwxrwxrwx 2 media_svc media_svc 4096 2011-12-28 09:38 Finnish
drwxrwxrwx 2 media_svc media_svc 4096 2011-12-28 09:38 Swedish

/home/media_svc/.xbmc/plugins/video/hulu/resources/language/English:
total 4
-rwxrwxrwx 1 media_svc media_svc 2548 2011-12-28 09:38 strings.xml

/home/media_svc/.xbmc/plugins/video/hulu/resources/language/Finnish:
total 4
-rwxrwxrwx 1 media_svc media_svc 2661 2011-12-28 09:38 strings.xml

/home/media_svc/.xbmc/plugins/video/hulu/resources/language/Swedish:
total 4
-rwxrwxrwx 1 media_svc media_svc 2513 2011-12-28 09:38 strings.xml

/home/media_svc/.xbmc/plugins/video/hulu/resources/lib:
total 188
-rwxrwxrwx 1 media_svc media_svc   308 2011-12-28 09:38 aes.py
-rwxrwxrwx 1 media_svc media_svc 77863 2011-12-28 09:38 BeautifulSoup.py
-rwxrwxrwx 1 media_svc media_svc  7727 2011-12-28 09:38 common.py
-rwxrwxrwx 1 media_svc media_svc 14738 2011-12-28 09:38 dec.py
-rwxrwxrwx 1 media_svc media_svc   700 2011-12-28 09:38 DecryptPid.as
-rwxrwxrwx 1 media_svc media_svc   461 2011-12-28 09:38 DecryptPid.swf
-rwxrwxrwx 1 media_svc media_svc   605 2011-12-28 09:38 decswf.py
-rwxrwxrwx 1 media_svc media_svc   756 2011-12-28 09:38 _hd.py
-rwxrwxrwx 1 media_svc media_svc  4919 2011-12-28 09:38 _home.py
-rwxrwxrwx 1 media_svc media_svc  1535 2011-12-28 09:38 hulu_login.py
-rwxrwxrwx 1 media_svc media_svc    47 2011-12-28 09:38 __init__.py
-rwxrwxrwx 1 media_svc media_svc  8012 2011-12-28 09:38 _movie.py
-rwxrwxrwx 1 media_svc media_svc   408 2011-12-28 09:38 notes.txt
-rwxrwxrwx 1 media_svc media_svc  2945 2011-12-28 09:38 rd.py
-rwxrwxrwx 1 media_svc media_svc  1917 2011-12-28 09:38 _rss.py
-rwxrwxrwx 1 media_svc media_svc  8568 2011-12-28 09:38 stream_hulu.py
-rwxrwxrwx 1 media_svc media_svc 14606 2011-12-28 09:38 _tv.py

/home/media_svc/.xbmc/userdata:
total 4
drwxrwxrwx 2 media_svc media_svc 4096 2011-12-28 10:33 database

/home/media_svc/.xbmc/userdata/database:
total 0

Any thoughts would be appreciated.

Cheers!
SubJunk Build or Custom from SVN (depends on my mood)
Xubuntu x64 (3.2)
AMD 64 X2 4800+ [OC 2.8GHz]
4GB DDR2
JRE 6 u[latest]
Sony KDL-40W5100
tmknight
 
Posts: 43
Joined: Fri Jan 08, 2010 5:18 pm

Re: PMS-Jumpy - Jump into Python (and onto XBMC)

Postby infidel » Wed Dec 28, 2011 8:42 pm

Hi all, back again :).

rocco24 wrote:I already uninstalled the previous version of PMS so I don't think I have this issue.

I just tested SHB34 and couldn't reproduce your problem. Can you attach debug.log+jumpy.log for both a good run (right after installing SHB) and a bad run (after restarting PMS-SHB). It's hard to tell what's going on without logs.


tmknight wrote:[main] INFO 11:03:03.732 java.io.IOException: Cannot run program "/usr/lib/python3.2" (in directory "/usr/lib/ps3mediaserver/plugins/jumpy"): java.io.IOException: error=13, Permission denied

A couple of things:
  • I don't have Python3 but '/usr/lib/python3.2' doesn't look right, the python binary should be in '/usr/bin' I would think.
  • XBMC addons are written for Python 2.4 and Jumpy for Python 2.7, I'm pretty sure you'll run into compatibility issues with Python3. Try Python 2.7.
tmknight wrote:I do not have xbmc installed, I merely created the directory structure under the service account home

It should work if you have a valid '$HOME/.xbmc' user folder with the Hulu plugin and its dependencies inside the 'addons' subfolder.
infidel
 
Posts: 278
Joined: Sun Aug 15, 2010 4:56 pm

PreviousNext

Return to Additions and Plugins

Who is online

Users browsing this forum: No registered users and 5 guests

cron