How to export posters?

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
tars Offline
Senior Member
Posts: 212
Joined: Aug 2015
Reputation: 4
Post: #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?
find quote
myron Offline
Moderator
Posts: 724
Joined: Jan 2011
Reputation: 23
Location: de_AT
Post: #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: project_thin_badge?format=gif]
find quote
tars Offline
Senior Member
Posts: 212
Joined: Aug 2015
Reputation: 4
Post: #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.
find quote
myron Offline
Moderator
Posts: 724
Joined: Jan 2011
Reputation: 23
Location: de_AT
Post: #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: project_thin_badge?format=gif]
(This post was last modified: 2017-04-29 10:29 by myron.)
find quote
tars Offline
Senior Member
Posts: 212
Joined: Aug 2015
Reputation: 4
Post: #5
I see. Thanks for the clarification!
find quote
tars Offline
Senior Member
Posts: 212
Joined: Aug 2015
Reputation: 4
Post: #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.
find quote