[Evaluate] - The Movie Database... first script, first trouble

Discussion in 'Submit: Movie Info Grabbers' started by lopez.tuparles, March 17, 2013.

  1. lopez.tuparles
    • Team MediaPortal

    lopez.tuparles Retired Team Member

    Joined:
    July 20, 2006
    Messages:
    396
    Likes Received:
    34
    Location:
    Mimet
    Ratings:
    +46 / 0
    Hi,
    i'am playing with TMDB V3 API and Mediaportal grabber.
    the TMDB API looks interesting cause it could be use with many language and the DB is pretty good.
    I assume i am a noob in Grabber manipulation.
    So it's seems easy, too easy maybe because the script won't completly work in Mediaportal but it works with scripttest.exe. :eek:

    In fact FindFilm() method works and i have logs in configuration.log but i can't retrieve any movie information, i have no log with GetDetails() method wich seems never called.

    Please Help

    Here are my logs when i update share in configuration:

    2013-03-17 17:10:19.460577 [Info.][IMDBFetcher(8)]: Grabber.FindFilm(Dogma,25)
    2013-03-17 17:10:19.471578 [Info.][IMDBFetcher(8)]: GetTitles(Dogma)
    2013-03-17 17:10:20.206620 [Debug][IMDBFetcher(8)]: GetTitles(Dogma) Ended
    2013-03-17 17:10:20.213620 [Info.][IMDBFetcher(8)]: Grabber.FindFilm(Dogma) [1832] Dogma (1999)
    2013-03-17 17:10:20.219621 [Debug][IMDBFetcher(8)]: Grabber.FindFilm(Dogma) [1832] http://api.themoviedb.org/3/movie/1832?api_key=e224fe4f3fec5f7b5570641f7cd3df3a&language=fr
    2013-03-17 17:10:20.225621 [Info.][IMDBFetcher(8)]: Grabber.FindFilm(Dogma) [41369] Judge Not: In Defense of Dogma (2002)
    2013-03-17 17:10:20.231621 [Debug][IMDBFetcher(8)]: Grabber.FindFilm(Dogma) [41369] http://api.themoviedb.org/3/movie/41369?api_key=e224fe4f3fec5f7b5570641f7cd3df3a&language=fr
    2013-03-17 17:10:20.237622 [Info.][IMDBFetcher(8)]: Grabber.FindFilm(Dogma) [145103] Dogman (2012)
    2013-03-17 17:10:20.242622 [Debug][IMDBFetcher(8)]: Grabber.FindFilm(Dogma) [145103] http://api.themoviedb.org/3/movie/145103?api_key=e224fe4f3fec5f7b5570641f7cd3df3a&language=fr
    2013-03-17 17:10:20.247622 [Info.][IMDBFetcher(8)]: Grabber.FindFilm(Dogma) Ended
    2013-03-17 17:10:22.238736 [Info.][Config Main(1)]: RefreshIMDB() - Refreshing MovieInfo for -Dogma
    2013-03-17 17:10:22.555754 [Info.][IMDBFetcher(10)]: Grabber.FindFilm(Dogma,25)
    2013-03-17 17:10:22.565755 [Info.][IMDBFetcher(10)]: GetTitles(Dogma)
    2013-03-17 17:10:22.946777 [Debug][IMDBFetcher(10)]: GetTitles(Dogma) Ended
    2013-03-17 17:10:22.954777 [Info.][IMDBFetcher(10)]: Grabber.FindFilm(Dogma) [1832] Dogma (1999)
    2013-03-17 17:10:22.960777 [Debug][IMDBFetcher(10)]: Grabber.FindFilm(Dogma) [1832] http://api.themoviedb.org/3/movie/1832?api_key=e224fe4f3fec5f7b5570641f7cd3df3a&language=fr
    2013-03-17 17:10:22.966778 [Info.][IMDBFetcher(10)]: Grabber.FindFilm(Dogma) [41369] Judge Not: In Defense of Dogma (2002)
    2013-03-17 17:10:22.971778 [Debug][IMDBFetcher(10)]: Grabber.FindFilm(Dogma) [41369] http://api.themoviedb.org/3/movie/41369?api_key=e224fe4f3fec5f7b5570641f7cd3df3a&language=fr
    2013-03-17 17:10:22.976778 [Info.][IMDBFetcher(10)]: Grabber.FindFilm(Dogma) [145103] Dogman (2012)
    2013-03-17 17:10:22.982779 [Debug][IMDBFetcher(10)]: Grabber.FindFilm(Dogma) [145103] http://api.themoviedb.org/3/movie/145103?api_key=e224fe4f3fec5f7b5570641f7cd3df3a&language=fr
    2013-03-17 17:10:22.987779 [Info.][IMDBFetcher(10)]: Grabber.FindFilm(Dogma) Ended


     

    Attached Files:

    Last edited: May 13, 2013
    • Like Like x 3
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. megahorst
    • Super User

    megahorst Super User

    Joined:
    July 8, 2006
    Messages:
    877
    Likes Received:
    173
    Ratings:
    +271 / 0
    Home Country:
    Germany Germany
    Show System Specs
    It would be great to have a tmdb api based script.

    They stated on their webpage:
    Have you tried to contact them?
     
  4. lopez.tuparles
    • Team MediaPortal

    lopez.tuparles Retired Team Member

    Joined:
    July 20, 2006
    Messages:
    396
    Likes Received:
    34
    Location:
    Mimet
    Ratings:
    +46 / 0
    For the moment, i just register and request for a private API key.There are several limitation with using the same API Key like a limited number a request so
    it's possible in the script to replace the API key and the Language, i quickly test in english and the grabber seems to work (only with scriptest.exe).

    Code (C):
    1.  
    2.     #region<<TMDB_PARAMETERS>>
    3.     public const string API_KEY = ""; //Insert API Key Here
    4.     public const string API_LANG = "fr"; //Change it to  'ISO 639-1 code Language'.
    5.     #endregion<<TMDB_PARAMETERS>>
    6.  
    So i don't undestand why it doesn't work completly with MP....:cry: That's why i don't contact them, i'm waiting to make it work before.
     
    Last edited: March 18, 2013
  5. megahorst
    • Super User

    megahorst Super User

    Joined:
    July 8, 2006
    Messages:
    877
    Likes Received:
    173
    Ratings:
    +271 / 0
    Home Country:
    Germany Germany
    Show System Specs
    I would like to try to help. Where did you find the scripttest.exe?
     
  6. lopez.tuparles
    • Team MediaPortal

    lopez.tuparles Retired Team Member

    Joined:
    July 20, 2006
    Messages:
    396
    Likes Received:
    34
    Location:
    Mimet
    Ratings:
    +46 / 0
  7. lopez.tuparles
    • Team MediaPortal

    lopez.tuparles Retired Team Member

    Joined:
    July 20, 2006
    Messages:
    396
    Likes Received:
    34
    Location:
    Mimet
    Ratings:
    +46 / 0
    Well, somethings strange with script conception.
    1/ It's seems necessary that the 'GetName()' method return the filename to retrieve movies details.
    2/ It's seems necessary to not fill the 'movieDetails.ID' in 'GetDetails()' method to make the infos write in Database.

    So, the script now seems to work in MP.

    here are the ISO code language:
    http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

    Change 'fr' by your own language code in script.
     
    Last edited: March 31, 2013
  8. megahorst
    • Super User

    megahorst Super User

    Joined:
    July 8, 2006
    Messages:
    877
    Likes Received:
    173
    Ratings:
    +271 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Nice to seee that you have got it. It seems that my 20 year old programming skills are a little bit outdated ...

    I have tested your version.
    I have changed the language to german and have tried to scrape some movies.

    what I have mentioned:
    Some movies are chrashing the MePo config.
    for example these one:
    http://www.themoviedb.org/movie/47712-d-vka-na-ko-t-ti
    http://www.themoviedb.org/movie/166960-the-race

    Could it be that non A-Z letters in title or originat title are a problem?

    The information about the age seems not to bedelivered.

    All other things are working fine.

    A big thx for this.
     
    Last edited: April 1, 2013
  9. lopez.tuparles
    • Team MediaPortal

    lopez.tuparles Retired Team Member

    Joined:
    July 20, 2006
    Messages:
    396
    Likes Received:
    34
    Location:
    Mimet
    Ratings:
    +46 / 0
    Well,
    I try the non [A-Z] letters and fortunetly the šě... letters are in [A-Z] letters. :eek:
    But it might be possible, than movies with empty genres may have some trouble. Sorry , i upload a corrected file.:whistle:

    Information about age, it's funny but i haven't see anything like PG Rating, do you ?

    Thanks for your reply (nice to see it works with other langugae than french and english).
     
    Last edited: April 1, 2013
    • Like Like x 1
  10. megahorst
    • Super User

    megahorst Super User

    Joined:
    July 8, 2006
    Messages:
    877
    Likes Received:
    173
    Ratings:
    +271 / 0
    Home Country:
    Germany Germany
    Show System Specs
    I have tested this release.
    No more crashes within the config.

    Age limitations:
    I have had a look to the api documentation.
    /3/movie/{id}/releases
    Should deliver them.

    The movies that I have mentioned in my post above both have these values set together with the German release date.
    I have also mentioned that "country" is not delivered by the scraper. Is it possible to deliver the country that is marked as primary?

    These movie does not deliver the german overview (only examples):
    https://www.themoviedb.org/movie/691-the-spy-who-loved-me
    https://www.themoviedb.org/movie/710-goldeneye
    https://www.themoviedb.org/movie/81025-salmon-fishing-in-the-yemen
     
    Last edited: April 3, 2013
    • Like Like x 1
  11. lopez.tuparles
    • Team MediaPortal

    lopez.tuparles Retired Team Member

    Joined:
    July 20, 2006
    Messages:
    396
    Likes Received:
    34
    Location:
    Mimet
    Ratings:
    +46 / 0
    Hello,

    Age Limitation had been added, thanks for the advice, i haven't seen it in documentation.
    I hope than Overview grabbin will be better. sometimes there is some strange char in Overview like different kind of " or -.
    I'm looking for primary country....
     
    • Like Like x 1
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!