Page 2 of 2

Re: Jumpy and testing with Firefox

Posted: Sun Jan 24, 2016 12:17 pm
by infidel
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)

Re: Jumpy and testing with Firefox

Posted: Mon Jan 25, 2016 10:03 am
by infidel
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 559 times
Disclaimer: for some reason Kodi doesn't seem to request or show the images, but it works on my Sony Bluray.