Author Topic: Export pictures  (Read 7531 times)

0 Members and 1 Guest are viewing this topic.

Offline AimHere

  • Older Power User
  • *****
  • Posts: 213
    • View Profile
Export pictures
« on: December 20, 2018, 10:53:03 pm »
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: [Select]
imagenameformat="%t%-%fs%-%in%%ext%"
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

Offline VVV_Easy_Programing

  • Older Power User
  • *****
  • Posts: 199
    • View Profile
Re: Export pictures
« Reply #1 on: December 29, 2018, 09:40:56 pm »
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)
« Last Edit: December 29, 2018, 09:42:51 pm by VVV_Easy_Programing »

Offline CAD

  • Older Power User
  • *****
  • Posts: 168
  • I've got my eye on you!
    • View Profile
Re: Export pictures
« Reply #2 on: February 20, 2019, 06:46:29 pm »
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
three fingered salutation