Author Topic: Script: Import poster with same filename as movie from same folder  (Read 23773 times)

0 Members and 2 Guests are viewing this topic.

Offline Einar

  • Member
  • *
  • Posts: 9
    • View Profile
Hello.

On the basis of the script that imports movie information from a text file I wrote a little script to automatically import posters from movie folders, but with the following restrictions. The poster file has to be within the same folder as the movie and the filename needs to be the same as the movie filename.

So here it is (see attachment), just for the case that it might be helpful to anyone.

Greetings,
Einar

[attachment deleted by admin]
« Last Edit: June 23, 2011, 12:32:40 pm by nostra »

Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Script: Import poster with same filename as movie from same folder
« Reply #1 on: April 11, 2011, 07:41:05 pm »
Quote
...just for the case that it might be helpful to anyone.

I'm sure it will. Thanks!

Offline akispavlopoulos

  • Member
  • *
  • Posts: 11
    • View Profile
Re: Script: Import poster with same filename as movie from same folder
« Reply #2 on: April 17, 2011, 09:26:31 am »
Hi Einar!

Thank you for your script. It is really very usefull! Well, it will be for me if you could change the filename of the poster :-). I mean that all my movies posters have the name "folder.jpg". Could you make a varied type of your script that imports the poster with this name inside the movie's folder? Thank you in advance!

Offline Einar

  • Member
  • *
  • Posts: 9
    • View Profile
Re: Script: Import poster with same filename as movie from same folder
« Reply #3 on: April 18, 2011, 11:13:51 am »
Hello akispavlopoulos.

According to your request I modified the script (see attachment to this post).
And I did that in a way that for other file names, just the name within the script has to be changed (line 167). The corresponding line in the script is commented. Currently it is 'folder.jpg' so you can use it right away ;)

So this second script is useful for the case that the poster file is within the same folder as the movie and has always one specific name (e.g. 'folder.jpg').

Greetings,
Einar




[attachment deleted by admin]

Offline akispavlopoulos

  • Member
  • *
  • Posts: 11
    • View Profile
Re: Script: Import poster with same filename as movie from same folder
« Reply #4 on: April 18, 2011, 02:14:32 pm »
Thank you!!!!! Thank you so much!! I think this topic must be sticky! You have done an excellent job!

Something more, a suggestion, but not so important: Can you make another script for importing the back.jpg (or whatever name) as the back of a dvd case and put is as "back cover"?

Again thank you very very much for your poster script!!

Offline Einar

  • Member
  • *
  • Posts: 9
    • View Profile
Re: Script: Import poster with same filename as movie from same folder
« Reply #5 on: April 18, 2011, 08:41:22 pm »
You're welcome.

Thanks for your suggestion. There is no explicit "back cover" field in PVD, but it is possible to add an image of a back cover to the "Front Cover" field. It does not seem to be possible to control the order of the images added to "Front Cover" though.
I will keep it in mind.


Offline rick.ca

  • Global Moderator
  • *****
  • Posts: 3241
  • "I'm willing to shoot you!"
    • View Profile
Re: Script: Import poster with same filename as movie from same folder
« Reply #6 on: April 19, 2011, 03:50:02 am »
What might be useful is a script that could be user-adapted to a variety of different circumstances. It could offer the option to specify the image to save (same filename, specific name or all images) to each of the image containers (imagelist, screenshots, froncover and cdcover). Froncover and cdcover only take one image, so I'm assuming "all images" would result in only the first image found being saved. Just to be clear: I'm thinking of nothing more than a well-documented script that most users would be able to edit to make these choices.

One might configure this script to save "same filename" as a poster, "front" as froncover, "back" as cdcover and "all images" as screenshots. It would be nice if "all images" excluded images saved elsewhere (i.e., it's "everything else"). And I'm assuming all image types can be handled without being user-specified. I particularly like the idea of dumping all images into screenshots. That provides a way to see them all in PVD—so individual images could be saved and reloaded elsewhere (e.g., the "extra" images might be alternate posters). And if they're not needed, they're easily deleted with the Remove all screenshots command.

Offline case56

  • Member
  • *
  • Posts: 1
    • View Profile
Hi all

Einar your script has been very useful to me, I'm curious to know if its possible for a script such as yours to import multiple images from folders into PVD as posters. I've attempted to edit your script (hope you don't mind me doing this) to try and get 2 images 'Front.jpg' and 'Back.jpg' imported as subsequent posters. Since I'm such a script newbie, I haven't been able to figure it out. Everything I've tried has resulted in only one image being loaded, I'm finding it difficult as I'm not sure how PVD handles poster imports.

Does the GetDownloadURL function need to be called twice for this to happen? or can 2 file paths be looped into the result? or can a string of both file paths be passed to the result?  and ontop of all this the AddImageURL procedure confuses me aswell, I am a newb however, can any one help me understand?

Offline Einar

  • Member
  • *
  • Posts: 9
    • View Profile
Hello.

Sorry for the late answer case56, I had too much to do recently. You're welcome to edit the script. It's nice to hear that it is useful.
I looked into the Problem of importing two images and, unfortunately, have to say that I can not find a solution either. After some experimenting it seems that the AddImageURL hasn't any effect at all (?) The image import happens when the return value (Result) of the GetDownloadURL function contains a path to an image file. But it also stops processing after this.
Even with some modification and a second, recursive, call of GetDownloadURL the second image is not added. The second image path could be obtained correctly though. Thus, the first path is returned and the image added, then the second path is returned but the image isn't added. So far I have no idea how to solve this and why the AddImageURL isn't working.

Hopefully someone else can help.

Best regards,
Einar

Offline pelisdb

  • Member
  • *
  • Posts: 15
    • View Profile
Re: Script: Import poster with same filename as movie from same folder
« Reply #9 on: September 02, 2016, 03:01:18 pm »
Hello:

I can't seem to find this script in the forum, does anybody have it?

Also, I'm trying to import posters on my local HD with AddImageURL, but it doesn't happens anything. I have verified the path is right, but maybe that command doesn't works with local files? I'm on PVD 1.0.2.7.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2711
    • View Profile
Re: Script: Import poster with same filename as movie from same folder
« Reply #10 on: September 03, 2016, 07:12:17 am »
Hello:

I can't seem to find this script in the forum, does anybody have it?

You have really lucky, because this script I have in my archives and it is added below.

You may be what helped other added script.
« Last Edit: September 03, 2016, 07:20:35 am by Ivek23 »
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline pelisdb

  • Member
  • *
  • Posts: 15
    • View Profile
Re: Script: Import poster with same filename as movie from same folder
« Reply #11 on: September 03, 2016, 10:37:44 am »
Thank you very much! You're very kind! I'll adapt it to my needs.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2711
    • View Profile
Re: Script: Import poster with same filename as movie from same folder
« Reply #12 on: September 03, 2016, 11:54:24 am »
Thank you very much! You're very kind! I'll adapt it to my needs.

Welcome in our forum, pelisdb and continue to enjoy with this software.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline pelisdb

  • Member
  • *
  • Posts: 15
    • View Profile
Re: Script: Import poster with same filename as movie from same folder
« Reply #13 on: September 07, 2016, 01:28:11 pm »
After looking at the FilmAffinity script, I managed to get AddImageURL to work. It works when mode=smNormal, not with mode=smPoster.

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2711
    • View Profile
Re: Script: Import poster with same filename as movie from same folder
« Reply #14 on: September 08, 2016, 03:36:58 pm »
After looking at the FilmAffinity script, I managed to get AddImageURL to work. It works when mode=smNormal, not with mode=smPoster.

Nice to hear that you have succeeded in the intention with which you want to import posters on your local HD. You have been very successful and you make yourself a script for this purpose, so congratulations for that.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD


Offline pra15

  • Older Power User
  • *****
  • Posts: 173
    • View Profile
Re: Script: Import poster with same filename as movie from same folder
« Reply #15 on: November 06, 2020, 12:25:55 am »
A variant, a small script to import several images from a local specific folder.
You can choose, change the extensions and the filenames in the options, see the script.
« Last Edit: November 06, 2020, 09:19:38 am by pra15 »

Offline Ivek23

  • Global Moderator
  • *****
  • Posts: 2711
    • View Profile
Re: Script: Import poster with same filename as movie from same folder
« Reply #16 on: November 06, 2020, 08:37:40 am »
Thanks, pra15.
Ivek23
Win 10 64bit (32bit)   PVD v0.9.9.21, PVD v1.0.2.7, PVD v1.0.2.7 + MOD