Jumpy and testing with Firefox

Discuss third party additions, plugins and translations for Universal Media Server
infidel
Developer
Posts: 571
Joined: Thu Jul 12, 2012 5:37 am

Re: Jumpy and testing with Firefox

Post by infidel » Sun Jan 24, 2016 12:17 pm

hoteloskar wrote:Is there a possibility to execute pms.addCmd also in the picture branch?
No, addCmd() is defined as a video item. But you could use addFolder() and addImage() like so:

Code: Select all

import os, sys, jumpy

if len(sys.argv) == 1:
	# initial call, set up a folder to call us back
	pms.addFolder('PSE/Urlaub/Aegypten 2004', [sys.argv[0], 'cmd100'])

elif sys.argv[1] == 'cmd100':
	# run batch file to extract photos
	os.system('D:/TCL80/MYTCL/PSE/CMD/cmd100.bat')
	# scan the output dir and add photos to xmb
	outputdir = 'D:\\outputdir'
	for f in os.listdir(outputdir):
		if f.lower().endswith(('.jpg', '.png')):
			pms.addImage(f, os.path.join(outputdir, f), thumb=None, details=None)

infidel
Developer
Posts: 571
Joined: Thu Jul 12, 2012 5:37 am

Re: Jumpy and testing with Firefox

Post by infidel » Mon Jan 25, 2016 10:03 am

hoteloskar wrote:This command coppies pictures into a distinct folder which I can then show in the xmb picture branch.
I was intrigued by your use of jumpy for images, which I hadn't ever actually tested before :). It occurred to me that if we use pms.addPlayer() it's possible to bypass extraction to disk and instead send the image straight to ums.

Working example with sample db is below (based on sql example here). To test it add this item to your jumpy-scripts.ini and restart ums:

Code: Select all

[+pixplayer]
cmd = ${home}/pix/pixplayer.py init
pixplayer.zip
unzip to plugins/jumpy
(353.73 KiB) Downloaded 127 times
Disclaimer: for some reason Kodi doesn't seem to request or show the images, but it works on my Sony Bluray.

Post Reply