[Evaluate] The Movie Database... first script, first trouble (1 Viewer)

lopez.tuparles

Retired Team Member
  • Premium Supporter
  • July 20, 2006
    396
    54
    49
    Mimet
    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
     

    Attachments

    • TMDB_MP13X_V04.zip
      5 KB
    Last edited:

    megahorst

    Super User
  • Team MediaPortal
  • Super User
  • July 8, 2006
    879
    259
    Home Country
    Germany Germany
    It would be great to have a tmdb api based script.

    They stated on their webpage:
    Please sign in and we'll assign you a private URL to trace your traffic and help you implement the API.

    Have you tried to contact them?
     

    lopez.tuparles

    Retired Team Member
  • Premium Supporter
  • July 20, 2006
    396
    54
    49
    Mimet
    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:
    	#region<<TMDB_PARAMETERS>>
    	public const string API_KEY = ""; //Insert API Key Here
    	public const string API_LANG = "fr"; //Change it to  'ISO 639-1 code Language'.
    	#endregion<<TMDB_PARAMETERS>>

    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:

    megahorst

    Super User
  • Team MediaPortal
  • Super User
  • July 8, 2006
    879
    259
    Home Country
    Germany Germany
    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:
    	#region<<TMDB_PARAMETERS>>
    	public const string API_KEY = ""; //Insert API Key Here
    	public const string API_LANG = "fr"; //Change it to  'ISO 639-1 code Language'.
    	#endregion<<TMDB_PARAMETERS>>

    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.

    I would like to try to help. Where did you find the scripttest.exe?
     

    lopez.tuparles

    Retired Team Member
  • Premium Supporter
  • July 20, 2006
    396
    54
    49
    Mimet
    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:

    megahorst

    Super User
  • Team MediaPortal
  • Super User
  • July 8, 2006
    879
    259
    Home Country
    Germany Germany
    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:

    lopez.tuparles

    Retired Team Member
  • Premium Supporter
  • July 20, 2006
    396
    54
    49
    Mimet
    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:

    megahorst

    Super User
  • Team MediaPortal
  • Super User
  • July 8, 2006
    879
    259
    Home Country
    Germany Germany
    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:

    lopez.tuparles

    Retired Team Member
  • Premium Supporter
  • July 20, 2006
    396
    54
    49
    Mimet
    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....
     

    Users who are viewing this thread

    Top Bottom