English > Support

Export pictures

(1/1)

AimHere:
Hi,

I need to export all the posters and screenshots from my PVD database. Most (if not all) movies have a single poster (which is really the DVD box cover)... some have a single screenshot, while others may have two or three. I've played around with the XML export template, but can't get it to do what I want.

I'd like to export the posters with filenames like "<title>-poster-<n>.jpg", and the screenshots as "<title>-screenshot-<n>.jpg", where "<title>" is the movie title, and "<n>" is the number of the image (where multiple images exist for a given movie).

So I modified a copy of the "XML (Movies)" export template, deleting most of the movie fields except for Title, adding "<screenshots>{%value=screenshots}</screenshots>"after the Posters line, and added the following line in the "%OPTIONS% section:


--- Code: ---imagenameformat="%t%-%fs%-%in%%ext%"
--- End code ---

Running the export seems to generate images with the correct filenames in the "images" subfolder.  "%t%" gets replaced by the movie title, "%fs%" is replaced by either "poster" or "screenshot", "%n%" gets replaced by a number (usually "1"), and "%ext%" gets replaced by ".jpg", as expected.

However, PVD is only exporting the FIRST image in each category. In other words, if a movie has multiple posters or screenshots, PVD only exports the first one.

How do I modify this so that it exports ALL the posters and screenshots, and numbers them appropriately?

aimhere

VVV_Easy_Programing:
I'm not too sure of the answer.
To make multiple outputs on a field when exporting you need one auxiliary file dummy template "*.tpl" with the main file template "*.ptm"

It's hard to explain. Have you tried your export files for KODI? See post:
http://www.videodb.info/forum_en/index.php/topic,1496.msg20070.html#msg20070

I think you should use an instruction similar to (with maxvalues more than 1):

<!-- Exporting PVD movie images with a dummy template -->
{%value=poster template="KODI_Templates\images.tpl" maxvalues="1" params="full"}

with the "images.tpl" like:

{%param=imgid}
{#StringReplace '{%param=imgdata}' '{%param=imgdata}' ''}

But I don't know if it works (at least in the KODI templates works for one Poster or one ScreenShot or for the string fields)

CAD:
You could have a look at
http://www.videodb.info/forum_en/index.php/topic,1453.0.html.
it was a long time ago when I wrote xbmc export, but from memory it dumped all images into the movie folder.

Plugins have been updated to Kodi, probably do same thing but better.
You could just use kodi export- It will give you a .nfo file with movie info + poster

Navigation

[0] Message Index

Go to full version