How to export posters?
#1
(2017-02-25, 18:10)mlaggner Wrote: I've updated the wiki with a generated list of all properties from the various classes at
https://github.com/tinyMediaManager/tiny...-Templates

Thanks for updating the guide. I've been trying to export movie posters, but can't make it work.

Quote:We've added a feature to trigger an export of images (with or without scaling) along the meta data export. In the following example you see how a movie poster can be exported via the template:
Code:
${foreach movies movie}
<img src="../${movie(../nopicture.gif);copyArtwork(type=POSTER, thumb=true, width=180, destination=images)}" />
${end}
To initiate the export process you only need ${movie;copyArtwork(type=...)}. All other options are optional.

I used the same code to export to "D:\Documents\" folder.
It correctly creates "D:\Documents\images" folder and adds poster thumbs to there.
But when I open the html file the images don't show up, pointing to the root folder of D drive instead of images folder.
What am I doing wrong?
#2
sorry for late reply;
Some issues have been fixed/changed... and will be available in next 2.9.4
You might want to try latest nightly build...

It should now work this way:

Preferred way - copy your posters
Code:
${movie;copyArtwork(type=POSTER, thumb=true, width=180, escape=true, default=../nopicture.gif)}
The default has been moved as parameter
thumb=true scales to your desired width, false copies image 1:1
escape should be always true, when you plan this to host on a web server

Alternative way - external http urls
Code:
${movie.artworkUrls.POSTER(../nopicture.gif)}
If you scrape your movies from an online source, we remember all the urls.
Then this will return the http url.
If you rebuild your TMM lib, or just import graphics, this is always empty!
(list is also not yet maintainable)
I would not recommend this.
tinyMediaManager - THE media manager of your choice :)
Wanna help translate TMM ?
Image
#3
Thanks for looking into the issue. But actually I found a workaround by manually adding the destination image folder name to the export code.

So instead of this:

Code:
<td><img src="${movie;copyArtwork(type=POSTER, thumb=true, width=200)}"/></td>

I used this, which is working nicely.

Code:
<td><img src="images\\${movie;copyArtwork(type=POSTER, thumb=true, width=200)}"/></td>

Just tested the latest nightly, but it still requires adding the subfolder name to the code.
#4
yes, this is intentional.
Although we always generate this in images folder, the access might be different.

Html in root needs images/xxx.jpg
detail in folder needs ../images/xxx.jpg
detail in folder imported via JQuery from root needs images/xxx.jpg
...

So the path depends on your template. (not sure if ../images will work in all cases)
Anyway, the latest fixes were for the default poster, which should now work fine Smile
tinyMediaManager - THE media manager of your choice :)
Wanna help translate TMM ?
Image
#5
I see. Thanks for the clarification!
#6
Can you support a parameter that skips creating image files if an image file with that name already exists in the destination image folder?
Then it could save time to re-create (mostly the same) thumbnails every time and allow to use the code with off-line storage if you already have images in the export folder.
#7
(2017-05-02, 16:41)tars Wrote: Can you support a parameter that skips creating image files if an image file with that name already exists in the destination image folder?
Then it could save time to re-create (mostly the same) thumbnails every time and allow to use the code with off-line storage if you already have images in the export folder.

Can you consider adding the requested feature? Maybe that could be a default setting that skips creating already existing images in the folder. Currently when you add just a few new movies, it has to re-create all those image files again for existing movies whenever exporting.

Logout Mark Read Team Forum Stats Members Help
How to export posters?0