Feature Request: Trakt as rating source? (1 Viewer)

kiwijunglist

Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    Hi

    I've been looking at the ratings posted on trakt, and I think I prefer them to rotten tomatoes and imdb. Is there a chance we could have an option to pull the average user rating from trakt?
     
    Last edited:

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    I'll look into that.

    As long as trakt allows me to provide their API/search with an IMDb tt-ID and the correct Trakt movie pops up to match, then I can do it easy, the same way RottenTomatoes allows me to do so via: http://rottentomatoes.com/alias?type=imdbid&s=0499549 (Avatar example)

    [edit]: Quick look at Trakt.tv API looks like they require JSON with authentication, which means I have to do a simelair proxy support system as I did with Dutch Moviemeter.nl because otherwise I would have to convert the XML based IMDb+ scraper-script into a C# based one and that is not something I want to even think about.

    Will have a chat with ltfearme/damienh as he worked on the Trakt plugin to see if he knows about a GET method to do it alike the way RottenTomatoes does, or can direct me to the JSON method for another proxy script on my server.
     
    Last edited:

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897

    Thanks for looking that up, the JSON output from the GET I can process with regular expression probably quicker as-is then trying to actually parse it and their API example:

    Returns:

    [collapse]
    {"title":"The Social Network","year":2010,"released":1285916400,"url":"http://trakt.tv/movie/the-social-network-2010","trailer":"(youtube link removed)","runtime":120,"tagline":"You don't get to 500 million friends without making a few enemies.","overview":"On a fall night in 2003, Harvard undergrad and computer programming genius Mark Zuckerberg sits down at his computer and heatedly begins working on a new idea. In a fury of blogging and programming, what begins in his dorm room as a small site among friends soon becomes a global social network and a revolution in communication. A mere six years and 500 million friends later, Mark Zuckerberg is the youngest billionaire in history... but for this entrepreneur, success leads to both personal and legal complications.","certification":"PG-13","imdb_id":"tt1285016","tmdb_id":37799,"rt_id":0,"last_updated":1342610861,"poster":"http://trakt.us/images/posters_movies/60.2.jpg","images":{"poster":"http://trakt.us/images/posters_movies/60.2.jpg","fanart":"http://trakt.us/images/fanart_movies/60.2.jpg"},"top_watchers":[{"plays":8,"username":"idarkside","protected":false,"full_name":"","gender":"male","age":24,"location":"UK","about":"","joined":1333065951,"avatar":"http://trakt.us/images/avatar-large.jpg","url":"http://trakt.tv/user/idarkside"},{"plays":5,"username":"starcitysecrets","protected":false,"full_name":"Carl Taylor","gender":"male","age":23,"location":"Brighton, UK","about":"Author of the WIP XBMC skin PROJECT NEBULA","joined":1291685523,"avatar":"http://trakt.us/images/avatars/677.jpg","url":"http://trakt.tv/user/starcitysecrets"},{"plays":4,"username":"Rooster242","protected":false,"full_name":"","gender":"","age":"","location":"","about":"","joined":1298419484,"avatar":"http://trakt.us/images/avatar-large.jpg","url":"http://trakt.tv/user/Rooster242"},{"plays":3,"username":"bkuri","protected":false,"full_name":"Bernardo Kuri","gender":"male","age":32,"location":"Mexico City","about":"","joined":1287685763,"avatar":"http://trakt.us/images/avatars/166.1.jpg","url":"http://trakt.tv/user/bkuri"},{"plays":3,"username":"robbiet480","protected":false,"full_name":"Robbie Trencheny","gender":"male","age":20,"location":"Oakland, CA, USA","about":"20 year old, teen, geek, developer","joined":1293067134,"avatar":"http://trakt.us/images/avatars/895.jpg","url":"http://trakt.tv/user/robbiet480"},{"plays":3,"username":"jonathanputney","protected":false,"full_name":"Jonathan P","gender":"male","age":27,"location":"Raleigh, NC","about":"","joined":1295328685,"avatar":"http://trakt.us/images/avatars/1594.jpg","url":"http://trakt.tv/user/jonathanputney"},{"plays":3,"username":"exstatica","protected":false,"full_name":"Exstatica","gender":"female","age":"","location":"","about":"","joined":1305243679,"avatar":"http://trakt.us/images/avatars/10090.jpg","url":"http://trakt.tv/user/exstatica"},{"plays":3,"username":"hanta","protected":false,"full_name":"","gender":"","age":"","location":"","about":"","joined":1315492272,"avatar":"http://trakt.us/images/avatar-large.jpg","url":"http://trakt.tv/user/hanta"},{"plays":3,"username":"clanmackenzie","protected":false,"full_name":"","gender":"","age":"","location":"","about":"","joined":1326025670,"avatar":"http://trakt.us/images/avatar-large.jpg","url":"http://trakt.tv/user/clanmackenzie"},{"plays":2,"username":"justin","protected":false,"full_name":"Justin","gender":"male","age":30,"location":"San Diego, CA","about":"Co-founder of trakt. Please use the feedback tab on the right side to leave us suggestions or bugs you come across. Hope you're enjoying the site!","joined":1285436965,"avatar":"http://trakt.us/images/avatars/1.4.jpg","url":"http://trakt.tv/user/justin"},{"plays":2,"username":"sean","protected":false,"full_name":"Sean Rudford","gender":"male","age":30,"location":"Portland, OR","about":"Web dev and what nots.","joined":1285436965,"avatar":"http://trakt.us/images/avatars/2.1.jpg","url":"http://trakt.tv/user/sean"},{"plays":2,"username":"suic7de","protected":false,"full_name":"Austin Lewis","gender":"male","age":"","location":"Texas","about":"","joined":1287695894,"avatar":"http://trakt.us/images/avatars/169.jpg","url":"http://trakt.tv/user/suic7de"}],"ratings":{"percentage":89,"votes":1195,"loved":1059,"hated":136},"stats":{"watchers":505,"plays":577,"scrobbles":572,"scrobbles_unique":500,"checkins":5,"checkins_unique":5,"collection":3969},"people":{"directors":[{"name":"David Fincher"}],"writers":[{"name":"Aaron Sorkin","job":"Screenplay"},{"name":"Ben Mezrich","job":"Novel"}],"producers":[{"name":"Ce\u00e1n Chaffin","executive":false},{"name":"Dana Brunetti","executive":false},{"name":"Kevin Spacey","executive":true},{"name":"Michael De Luca","executive":false},{"name":"Scott Rudin","executive":false}],"actors":[{"name":"Jesse Eisenberg","character":"Mark Zuckerberg"},{"name":"Andrew Garfield","character":"Eduardo Saverin"},{"name":"Justin Timberlake","character":"Sean Parker"},{"name":"Rooney Mara","character":"Erica"},{"name":"Bryan Barter","character":"Billy Olsen"},{"name":"Dustin Fitzsimons","character":"Phoenix Club President"},{"name":"Armie Hammer","character":"Cameron Winklevoss"},{"name":"Joseph Mazzello","character":"Dustin Moskovitz"},{"name":"Patrick Mapel","character":"Chris Hughes"},{"name":"Max Minghella","character":""},{"name":"Toby Meuli","character":"Phoenix Member Playing Facemash"},{"name":"Rashida Jones","character":""},{"name":"Malese Jow","character":"Alice"},{"name":"Brenda Song","character":""},{"name":"Dakota Johnson","character":""},{"name":"Trevor Wright","character":""},{"name":"Adina Porter","character":"Gretchen's Associate"}]},"genres":["Drama"]}
    [/collapse]

    Which seems to hold all the info I need, infact I could even expand IMDb+ to accept Trakt as a full input source as well for all the other details, inclusing artwork.

    So will request API key and go from there.
     
    Last edited:

    Edalex

    Community Plugin Dev
  • Premium Supporter
  • January 3, 2008
    2,959
    1,270
    Saratov
    Home Country
    Russian Federation Russian Federation
    Thanks for looking that up, the JSON output from the GET I can process with regular expression probably quicker as-is then trying to actually parse it
    So will request API key and go from there.
    Hope no c# professional will read that you will parse json with regex. :D
    And API key from example is yours. Mine is
    Code:
    apikey
     
    Your API key is 2a978de.....
     
    Last edited:

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Thanks for looking that up, the JSON output from the GET I can process with regular expression probably quicker as-is then trying to actually parse it
    So will request API key and go from there.
    Hope no c# professional will read that you will parse json with regex. :D
    And API key from example is yours. Mine is
    Code:
    apikey
     
    Your API key is 2a978de.....

    That's what I get for doing last minute replying and not paying attention. Edited the link out and will ask them to generate me a new one :)

    And yeah, I know it's like a sin to parse JSON the way I plan to do, but sometimes you just have to take shortcuts ;)
     

    Users who are viewing this thread

    Similar threads

    I've updated dlls in first post. Fixes: Summary / Overview was always empty Collections were not filtered to official ones Studios were not populated Fallback to english tagline didn't work Score / Popularity now empty instead of dummy rating and unknown popularity numbers Also I've tried to compile plugin against MP 1.34 x64 and...
    I've updated dlls in first post. Fixes: Summary / Overview was always empty Collections were not filtered to official ones Studios...
    Hi! TheTVDB.com has movies in their API now. API itself looks ok now so I decided to add TVDB to Moving Pictures. Check it if you...
    Replies
    2
    Views
    1K
    Hi CyberSimian (and others) just a bit along the coast from me (near Exeter) - I know you are very long-standing! Not going to make this long winded or anything, but just to point out over the @15 years I've overall donated several hundred quid. And I begrduge NONE of it, not a penny - I do wish MP well - 100%. It is an awesome...
    Hi CyberSimian (and others) just a bit along the coast from me (near Exeter) - I know you are very long-standing! Not going to...
    ONGGGG term MP user (and donator - why wouldn't you?) and leaving somewhat reluctantly. Few reasons, some that just seem...
    Replies
    4
    Views
    2K
    • Sticky
    Shame on me. That's it. I forgot that this computer was still running the 32-bit version of MP. From now on, I will no longer do updates in the morning :).
    Shame on me. That's it. I forgot that this computer was still running the 32-bit version of MP. From now on, I will no longer do...
    We have just released MediaPortal 1.38 - Tatiana & Leo x86 and x64 version. Highlights of this release Bugfixes: New...
    Replies
    24
    Views
    2K
    You can always try, select any window, turn off the Media Portal, change the ID of the selected one to the desired one (plugin) and check.
    You can always try, select any window, turn off the Media Portal, change the ID of the selected one to the desired one (plugin) and...
    I don't have a TV card in my HTPC setup, so I really only use plugins that browse and show media files, like MP TV-Series, Moving...
    Replies
    5
    Views
    3K
    Perhaps... Only way to confirm would be for me to invest in a different USB DVB-S2 tuner (like the Hauppauge WinTV-NOVA-S2), which I might do if the issue persists.
    Perhaps... Only way to confirm would be for me to invest in a different USB DVB-S2 tuner (like the Hauppauge WinTV-NOVA-S2), which...
    I have a dedicated TV Server x64 v1.36 running on Windows 11, with a Hauppauge WinTV-dualHD tuner for DVB-T channels (Freeview) and...
    Replies
    8
    Views
    2K
    Top Bottom