Jumpy and testing with Firefox

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
infidel
Developer
Posts: 571
Joined: Thu Jul 12, 2012 5:37 am

Re: Jumpy and testing with Firefox

Post 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)
infidel
Developer
Posts: 571
Joined: Thu Jul 12, 2012 5:37 am

Re: Jumpy and testing with Firefox

Post 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 550 times
Disclaimer: for some reason Kodi doesn't seem to request or show the images, but it works on my Sony Bluray.
Post Reply