TheMovieDB Poster&Info Downloader V2.0

Overview

This is an updated Version of the MovieDB Poster Downloader Script utilizing the new DOpus 11 Script functionality.
This script will add a new command to DOpus to download Movie Poster, Backdrops and Information from TheMovieDB.org.

Installation
Open Preferences / Toolbars / Scripts, then download TheMovieDB Downloader.osp (below) and drag it to the list.
TheMovieDB Downloader.osp (18.8 KB)

Usage
Once the script is installed there is a new command TheMovieDB-Downloader availabe in the command editor. You can find some information about the command and config parameters in the about dialog of the script add-in.

To facilitate the first steps, here is an example Menu Button to show the functionality. Just download the dcf file and drag it to a toolbar while in customize mode.
TheMovieDB Downloader.dcf (2.23 KB)

Feel free to use, optimize and enhance the script. Please post your changes in this thread of the Dopus Resource Centre forum.

Development Version
Preliminary Alpha Release V2.1.0a for Dopus V11.5.1b with Custom Columns

1 Like

Thanks for sharing. Not tested it yet but looks good.

Small Update to 2.0.1.

Fixed Problem with download on network paths.

TheMovieDB Downloader.osp (18.8 KB)

Hello,
I have DO 11. I have installed the script (about says it is 2.0.1), and have installed the toolbar button. I select the movie file I'd like to download for but nothing happens. Is it the naming convention? My movies are all named with the title and the year, like "While You Were Sleeping (1995).m4v". I tried with the year, and without and got nothing. Any suggestion to what I should try? also, Is there a way that it could ignore what's in parentheses? Since all my movies have the year in parentheses I'm hoping I don't have to change that to use this.
Thanks for any guidance!
AR

Hi AR,

you don't have to change your naming scheme, you just have to use the "TITLEREGEXP" parameter.

TITLEREGEXP
Regular expression to extract the movie title from the filename. Movie Title must end in the $1 group.
Default: (.*)

In your case with the year in parenthesis, and assuming that the actual movie title is before the opening parenthesis and everything after is something else this command should work:

TheMovieDB-Downloader FILE {filepath$} TITLEREGEXP="(.*)\(.*"

If you still don't get the cover downloaded, set the logging to debug and take a look at the dopus script output to see what is happening.

Regards,

Miran

THANK YOU VERY MUCH!!!
Worked very well and I've been looking for a good movie poster downloader for a very long time.

Best regards,
Clicks

This is awesome, thanks Miran.

Preliminary Alpha Release V2.1.0a for Dopus V11.5.1b

Added Custom Columns

TheMovieDB Downloader.osp (24.9 KB)

Hi,
Ok, the above worked. Looks like the problem I was originally having with nothing happening was related to DOpus having internet connection problems. Once that was fixed it worked as intended. However, regarding the year in parentheses and anything afterward, how do I add this line that you wrote above to it? also, is there any way that it can read the movie name despite missing a character? for exmaple, "X-men: Days of future past", I've replaced my colon with a space because I can't name a file with that character (:). So is it possible for it to search it and find it even though tmdb has it with the colon?
Thanks for the great script!
AR

Anybody know what I do to add the command mentioned above?

TheMovieDB-Downloader FILE {filepath$} TITLEREGEXP="(.*)\(.*"

Where in the scrip or button do I add this?

AR

"TheMovieDB-Downloader" is a custom command, "TITLEREGEXP" a Parameter you could use to extract the Movie Title from the file name with the help of a RegExp.

Infos on how to add and change buttons:

The Script just passes the extracted title as search string to TheMovieDBs API, therefore it depends on their search algorithm what is found and what not. Often it works without the colon. Maybe because their is an alternate title in the tmdb or maybe the search engine is smart enough.

Ok, I think I finally got it, per your instructions and the instructions in the link. It works great!! I think the reason I was having trouble previously is because I needed a restart and update to the latest version.
Thanks again for such a wonderful script, it has saved me a lot of time!
AR

Can you post an example of what exactly what should be written in the command? Say, for discussion sake, the name of the movie is Die Hard.

What should this command look like?

Like this?

TheMovieDB-Downloader FILE {filepath$} TITLEREGEXP="Die Hard(.*)\(.*"

File: Die Hard.avi
Command: TheMovieDB-Downloader FILE {filepath$}

File: Die Hard (1988).avi
Command: TheMovieDB-Downloader FILE {filepath$} TITLEREGEXP="(.*)\(.*" ERRFILE

The TITLEREGEXP should contain a regular expression that extracts the movie title from the actual file name. The Movie Title must end in the first group (expression within the first "()" ).

hi there,

i belive, i am to stupid for this script. Ok this is my first script , but it does not run on my system . :neutral_face:

This are my steps to use ist ...

  1. put the script-button in to the toolbar

    TheMovieDB-Downloader {filename$} {filepath$} TITLEREGEXP="(.*)\(.*" errfile infofile backdrop
    
  2. select a file

  3. click the button several times

    TheMovieDB.org Poster&Info Downloader:    General failure getting response from MovieDB.org
    TheMovieDB.org Poster&Info Downloader:    General failure getting response from MovieDB.org
    TheMovieDB.org Poster&Info Downloader:    General failure getting response from MovieDB.org
    TheMovieDB.org Poster&Info Downloader:    General failure getting response from MovieDB.org
    TheMovieDB.org Poster&Info Downloader:    General failure getting response from MovieDB.org
    TheMovieDB.org Poster&Info Downloader:    General failure getting response from MovieDB.org
    TheMovieDB.org Poster&Info Downloader:    General failure getting response from MovieDB.org
    TheMovieDB.org Poster&Info Downloader:    No Movie found on MovieDB.org for: Xmen Origins Wolverine - German
    Fehler in Zeile 1, Position 5
        @script vbscript
        ^
    UngĂĽltiges Zeichen (0x800a0408)
    Parsefehler - Skript abgebrochen
    TheMovieDB.org Poster&Info Downloader:    General failure getting response from MovieDB.org
    TheMovieDB.org Poster&Info Downloader:    General failure getting response from MovieDB.org
    TheMovieDB.org Poster&Info Downloader:    General failure getting response from MovieDB.org
    TheMovieDB.org Poster&Info Downloader:    General failure getting response from MovieDB.org
    TheMovieDB.org Poster&Info Downloader:    General failure getting response from MovieDB.org
    TheMovieDB.org Poster&Info Downloader:    General failure getting response from MovieDB.org
    
  4. nothing happens in the folder of the file

where is my mistake ??

can you help me ??

thank you so much...
z.

{filename$} {filepath$}
looks not right. try it without the additional filename.

Hmm, "general failure" could be everything :slight_smile: no internet connection, wrong proxy settings, service down,
set LogLevel to Debug in the Script Config to get more information from the script.

No movie found due to wrong Title :slight_smile:
the api will find everything that is "similar" to one of the alternate titles of the movie (themoviedb.org/movie/2080-x- ... lease-info). eg. "X-Men Origins Wolverine" would work, while your title "Xmen Origins Wolverine - German" would not.

That's probably an error from an other script, as the MovieDB script is jscript and not vbscript :grin:

ok .. then next try with following:

TheMovieDB-Downloader filepath$ TITLEREGEXP="(.*)\(.*" errfile infofile backdrop

this is the debug log:

TheMovieDB.org Poster&Info Downloader:    LogLevelName: DEBUG
TheMovieDB.org Poster&Info Downloader:    NotFoundFileExtension: .error
TheMovieDB.org Poster&Info Downloader:    InfoFileExtension: .nfo
TheMovieDB.org Poster&Info Downloader:    BackdropSuffix: -backdrop
TheMovieDB.org Poster&Info Downloader:    File: 
TheMovieDB.org Poster&Info Downloader:    TitleRegExp: (.*)
TheMovieDB.org Poster&Info Downloader:    ErrFile: false
TheMovieDB.org Poster&Info Downloader:    InfoFile: false
TheMovieDB.org Poster&Info Downloader:    NoPoster: false
TheMovieDB.org Poster&Info Downloader:    PosterSize: original
TheMovieDB.org Poster&Info Downloader:    Backdrop: false
TheMovieDB.org Poster&Info Downloader:    BackdropSize: original
TheMovieDB.org Poster&Info Downloader:    FilePath: 
TheMovieDB.org Poster&Info Downloader:    FileNameWoExt: 
TheMovieDB.org Poster&Info Downloader:    FileNameExt: 
TheMovieDB.org Poster&Info Downloader:    MovieTitle: 
TheMovieDB.org Poster&Info Downloader:    MovieDB Config Status: 200
TheMovieDB.org Poster&Info Downloader:    MovieDB Config: {"images":{"base_url":"http://image.tmdb.org/t/p/","secure_base_url":"https://image.tmdb.org/t/p/","backdrop_sizes":["w300","w780","w1280","original"],"logo_sizes":["w45","w92","w154","w185","w300","w500","original"],"poster_sizes":["w92","w154","w185","w342","w500","w780","original"],"profile_sizes":["w45","w185","h632","original"],"still_sizes":["w92","w185","w300","original"]},"change_keys":["adult","air_date","also_known_as","alternative_titles","biography","birthday","budget","cast","certifications","character_names","created_by","crew","deathday","episode","episode_number","episode_run_time","freebase_id","freebase_mid","general","genres","guest_stars","homepage","images","imdb_id","languages","name","network","origin_country","original_name","original_title","overview","parts","place_of_birth","plot_keywords","production_code","production_companies","production_countries","releases","revenue","runtime","season","season_number","season_regular","spoken_languages","status","tagline","title","translations","tvdb_id","tvrage_id","type","video","videos"]}
TheMovieDB.org Poster&Info Downloader:    MovieDB Images Base URL: [image.tmdb.org/t/p/](http://image.tmdb.org/t/p/)
TheMovieDB.org Poster&Info Downloader:    
TheMovieDB.org Poster&Info Downloader:    MovieDB Poster Search Url: [api.themoviedb.org/3/search/mov ... 58e&query=](https://api.themoviedb.org/3/search/movie?api_key=2cc30e3146b2f44d504561e96cfb358e&query=)
TheMovieDB.org Poster&Info Downloader:    MovieDB Search Status: 404
TheMovieDB.org Poster&Info Downloader:    MovieDB Searchresult: {"status_code":6,"status_message":"Invalid id: The pre-requisite id is invalid or not found."}
TheMovieDB.org Poster&Info Downloader:    General failure getting response from MovieDB.org

there is a new question for you :smiley: ..
how can i switch the following parameters to true :

thank you for your quickly help :wink:.

Add command switches "BACKDROP INFOFILE". As you already have them in your command in lowercase dopus probably requires them in upper case, but haven't verified myself.

The case should not matter, but the order could, depending on the command template.