Gametrailers - support thread

Discussion in 'OnlineVideos' started by Rick164, June 12, 2011.

  1. Rick164
    • Super User

    Rick164 Super User

    Joined:
    January 7, 2006
    Messages:
    1,335
    Likes Received:
    918
    Ratings:
    +1,359 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Hi,

    The current Gametrailers.com provider didn't allow for much since it relied only on the RSS feeds, rewrote it and now supports the following:

    - (Sub)categories.
    - Multi page.
    - Less cluttered with description on the left and game name as title.

    To do:

    -Add SD support but need to look at the online videos documentation to figure out how to do this properly, so currently it only retrieves HD movies.
    -Add Special videos support (like bonus round), can't be retrieved with generic site util as it requires more checks and different means of getting the video url.
    -Search support.



    Here is the code for anyone who wants to use it, it's already an improvement over the current version but still needs some work done.

    Code (Text):
    1.  
    2. <Site name="Gametrailers" util="GenericSite" agecheck="false" enabled="true" lang="en" lastUpdated="2011-06-12T00:00:00.0654986+02:00">
    3.   <Configuration>
    4.     <item key="dynamicCategoriesRegEx"></item>
    5.     <item key="videoListRegEx"><![CDATA[<div\sclass="gamepage_content_row_thumb">.*?<img\ssrc="(?<ImageUrl>[^"]*)"\sclass="gamepage_content_row_image"\salt="">.*?<a\shref=".*?(?<VideoUrl>[0-9]*)"><img\sborder="0"\ssrc="http://gametrailers\.mtvnimages\.com/images/sitewide/HDupper\.gif">.*?gamepage_content_row_title">(?<Title>[^<]*)</a>.*?bold;">(?<Description>.*?)</div>]]></item>
    6.     <item key="videoListRegExFormatString"><![CDATA[http://mosii.gametrailers.com/getmediainfo4.php?hd=1&mid={0}]]></item>
    7.     <item key="videoUrlRegEx"><![CDATA[umfilename=(?<url>[^&]*)]]></item>
    8.     <item key="videoUrlFormatString"><![CDATA[http://trailers.gametrailers.com/gt_vault/{0}.flv]]></item>
    9.     <item key="nextPageRegEx"><![CDATA[<a\shref="(?<url>[^"]*)"\sclass="Page">Next\s&raquo;</a>]]></item>
    10.     <item key="playlistUrlFormatString"><![CDATA[http://trailers.gametrailers.com/gt_vault/{0}.flv]]></item>
    11.     <item key="fileUrlRegEx"><![CDATA[umfilename=(?<m0>[^&]*)]]></item>
    12.     <item key="fileUrlFormatString"><![CDATA[http://trailers.gametrailers.com/gt_vault/{0}.flv]]></item>
    13.     <item key="baseUrl"><![CDATA[http://www.gametrailers.com]]></item>
    14.     <item key="videoThumbFormatString"><![CDATA[{0}]]></item>
    15.   </Configuration>
    16.   <Categories>
    17.     <Category xsi:type="RssLink" name="PC" thumb="" desc="">
    18.       <SubCategories>
    19.         <Category xsi:type="RssLink" name="Newest Media" thumb="" desc="">http://pc.gametrailers.com/#Content</Category>
    20.         <Category xsi:type="RssLink" name="Trailers" thumb="" desc="">http://pc.gametrailers.com/?show=Trailers#Content</Category>
    21.         <Category xsi:type="RssLink" name="Features" thumb="" desc="">http://pc.gametrailers.com/?show=Features#Content</Category>
    22.         <Category xsi:type="RssLink" name="Previews" thumb="" desc="">http://pc.gametrailers.com/?show=Previews#Content</Category>
    23.         <Category xsi:type="RssLink" name="Reviews" thumb="" desc="">http://pc.gametrailers.com/?show=Reviews#Content</Category>
    24.         <Category xsi:type="RssLink" name="Interviews" thumb="" desc="">http://pc.gametrailers.com/?show=Interviews#Content</Category>
    25.         <Category xsi:type="RssLink" name="Gameplay" thumb="" desc="">http://pc.gametrailers.com/?show=Gameplay#Content</Category>
    26.       </SubCategories>http://pc.gametrailers.com/</Category>
    27.     <Category xsi:type="RssLink" name="PS3" thumb="" desc="">
    28.       <SubCategories>
    29.         <Category xsi:type="RssLink" name="Newest Media" thumb="" desc="">http://PS3.gametrailers.com/#Content</Category>
    30.         <Category xsi:type="RssLink" name="Trailers" thumb="" desc="">http://PS3.gametrailers.com/?show=Trailers#Content</Category>
    31.         <Category xsi:type="RssLink" name="Features" thumb="" desc="">http://PS3.gametrailers.com/?show=Features#Content</Category>
    32.         <Category xsi:type="RssLink" name="Previews" thumb="" desc="">http://PS3.gametrailers.com/?show=Previews#Content</Category>
    33.         <Category xsi:type="RssLink" name="Reviews" thumb="" desc="">http://PS3.gametrailers.com/?show=Reviews#Content</Category>
    34.         <Category xsi:type="RssLink" name="Interviews" thumb="" desc="">http://PS3.gametrailers.com/?show=Interviews#Content</Category>
    35.         <Category xsi:type="RssLink" name="Gameplay" thumb="" desc="">http://PS3.gametrailers.com/?show=Gameplay#Content</Category>
    36.       </SubCategories>http://PS3.gametrailers.com/</Category>
    37.     <Category xsi:type="RssLink" name="Xbox360" thumb="" desc="">
    38.       <SubCategories>
    39.         <Category xsi:type="RssLink" name="Newest Media" thumb="" desc="">http://xbox360.gametrailers.com/#Content</Category>
    40.         <Category xsi:type="RssLink" name="Trailers" thumb="" desc="">http://xbox360.gametrailers.com/?show=Trailers#Content</Category>
    41.         <Category xsi:type="RssLink" name="Features" thumb="" desc="">http://xbox360.gametrailers.com/?show=Features#Content</Category>
    42.         <Category xsi:type="RssLink" name="Previews" thumb="" desc="">http://xbox360.gametrailers.com/?show=Previews#Content</Category>
    43.         <Category xsi:type="RssLink" name="Reviews" thumb="" desc="">http://xbox360.gametrailers.com/?show=Reviews#Content</Category>
    44.         <Category xsi:type="RssLink" name="Interviews" thumb="" desc="">http://xbox360.gametrailers.com/?show=Interviews#Content</Category>
    45.         <Category xsi:type="RssLink" name="Gameplay" thumb="" desc="">http://xbox360.gametrailers.com/?show=Gameplay#Content</Category>
    46.       </SubCategories>http://xbox360.gametrailers.com/</Category>
    47.         <Category xsi:type="RssLink" name="Wii" thumb="" desc="">
    48.       <SubCategories>
    49.         <Category xsi:type="RssLink" name="Newest Media" thumb="" desc="">http://wii.gametrailers.com/#Content</Category>
    50.         <Category xsi:type="RssLink" name="Trailers" thumb="" desc="">http://wii.gametrailers.com/?show=Trailers#Content</Category>
    51.         <Category xsi:type="RssLink" name="Features" thumb="" desc="">http://wii.gametrailers.com/?show=Features#Content</Category>
    52.         <Category xsi:type="RssLink" name="Previews" thumb="" desc="">http://wii.gametrailers.com/?show=Previews#Content</Category>
    53.         <Category xsi:type="RssLink" name="Reviews" thumb="" desc="">http://wii.gametrailers.com/?show=Reviews#Content</Category>
    54.         <Category xsi:type="RssLink" name="Interviews" thumb="" desc="">http://wii.gametrailers.com/?show=Interviews#Content</Category>
    55.         <Category xsi:type="RssLink" name="Gameplay" thumb="" desc="">http://wii.gametrailers.com/?show=Gameplay#Content</Category>
    56.       </SubCategories>http://wii.gametrailers.com/</Category>
    57.        <Category xsi:type="RssLink" name="PSP" thumb="" desc="">
    58.       <SubCategories>
    59.         <Category xsi:type="RssLink" name="Newest Media" thumb="" desc="">http://psp.gametrailers.com/#Content</Category>
    60.         <Category xsi:type="RssLink" name="Trailers" thumb="" desc="">http://psp.gametrailers.com/?show=Trailers#Content</Category>
    61.         <Category xsi:type="RssLink" name="Features" thumb="" desc="">http://psp.gametrailers.com/?show=Features#Content</Category>
    62.         <Category xsi:type="RssLink" name="Previews" thumb="" desc="">http://psp.gametrailers.com/?show=Previews#Content</Category>
    63.         <Category xsi:type="RssLink" name="Reviews" thumb="" desc="">http://psp.gametrailers.com/?show=Reviews#Content</Category>
    64.         <Category xsi:type="RssLink" name="Interviews" thumb="" desc="">http://psp.gametrailers.com/?show=Interviews#Content</Category>
    65.         <Category xsi:type="RssLink" name="Gameplay" thumb="" desc="">http://psp.gametrailers.com/?show=Gameplay#Content</Category>
    66.       </SubCategories>http://psp.gametrailers.com/</Category>
    67.         <Category xsi:type="RssLink" name="3DS" thumb="" desc="">
    68.       <SubCategories>
    69.         <Category xsi:type="RssLink" name="Newest Media" thumb="" desc="">http://3ds.gametrailers.com/#Content</Category>
    70.         <Category xsi:type="RssLink" name="Trailers" thumb="" desc="">http://3ds.gametrailers.com/?show=Trailers#Content</Category>
    71.         <Category xsi:type="RssLink" name="Features" thumb="" desc="">http://3ds.gametrailers.com/?show=Features#Content</Category>
    72.         <Category xsi:type="RssLink" name="Previews" thumb="" desc="">http://3ds.gametrailers.com/?show=Previews#Content</Category>
    73.         <Category xsi:type="RssLink" name="Reviews" thumb="" desc="">http://3ds.gametrailers.com/?show=Reviews#Content</Category>
    74.         <Category xsi:type="RssLink" name="Interviews" thumb="" desc="">http://3ds.gametrailers.com/?show=Interviews#Content</Category>
    75.         <Category xsi:type="RssLink" name="Gameplay" thumb="" desc="">http://3ds.gametrailers.com/?show=Gameplay#Content</Category>
    76.       </SubCategories>http://3ds.gametrailers.com/</Category>
    77.     <Category xsi:type="RssLink" name="Mobile" thumb="" desc="">
    78.       <SubCategories>
    79.         <Category xsi:type="RssLink" name="Newest Media" thumb="" desc="">http://mobile.gametrailers.com/#Content</Category>
    80.         <Category xsi:type="RssLink" name="Trailers" thumb="" desc="">http://mobile.gametrailers.com/?show=Trailers#Content</Category>
    81.         <Category xsi:type="RssLink" name="Features" thumb="" desc="">http://mobile.gametrailers.com/?show=Features#Content</Category>
    82.         <Category xsi:type="RssLink" name="Previews" thumb="" desc="">http://mobile.gametrailers.com/?show=Previews#Content</Category>
    83.         <Category xsi:type="RssLink" name="Reviews" thumb="" desc="">http://mobile.gametrailers.com/?show=Reviews#Content</Category>
    84.         <Category xsi:type="RssLink" name="Interviews" thumb="" desc="">http://mobile.gametrailers.com/?show=Interviews#Content</Category>
    85.         <Category xsi:type="RssLink" name="Gameplay" thumb="" desc="">http://mobile.gametrailers.com/?show=Gameplay#Content</Category>
    86.       </SubCategories>http://mobile.gametrailers.com/</Category>
    87.   </Categories>
    88. </Site>
    89.  
     
    Last edited: May 19, 2016
    • Like Like x 2
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Cinnabuns

    Cinnabuns Portal Pro

    Joined:
    August 2, 2009
    Messages:
    57
    Likes Received:
    37
    Ratings:
    +37 / 0
    Home Country:
    United States of America United States of America
    :D This one actually has working categories unlike the default one :D
     
  4. offbyone
    • Team MediaPortal

    offbyone Development Group

    Joined:
    April 26, 2008
    Messages:
    3,981
    Likes Received:
    2,704
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +3,303 / 3
    Home Country:
    Germany Germany
    Show System Specs
    Nonesense, the default one works fine!

    I'd like to update to this, but have a question: Would it be possible to also parse the date or length of a video out of the html?
     
  5. Snedig

    Snedig Portal Member

    Joined:
    July 1, 2009
    Messages:
    20
    Likes Received:
    3
    Ratings:
    +3 / 0
    Home Country:
    Norway Norway
    Cinnabuns is right - the default one doesn't have working categories for me either, although I think there's some factor that makes it work for some, and not for others.

    On my system I redid all the RSS url's in the plugin to see if there was a wrong tag in there or something. Although the RSS lines didn't seem quite like the ones that were presented on GameTrailers.com, when I changed them to the same URL's that gave me correct categories in IE/Chrome, they would still not give me working categories in MP. It didn't respect the tag for HD only either.

    In short, either both the old RSS tags, and my new ones were botched, or there's some other reason it's not working properly, string formats perhaps? This could possibly explain why it seems to work for you, could be a localization-related issue.
     
  6. offbyone
    • Team MediaPortal

    offbyone Development Group

    Joined:
    April 26, 2008
    Messages:
    3,981
    Likes Received:
    2,704
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +3,303 / 3
    Home Country:
    Germany Germany
    Show System Specs
    Hi, just wanted to drop a note that I updated GameTrailers and pushed it to the server, so AutoUpdate will get it on next OnlineVideos start. I used Rick's xml (thx) with a few required modification to get the files playing.
     
    • Like Like x 2
  7. Fub4r

    Fub4r New Member

    Joined:
    April 5, 2008
    Messages:
    2
    Likes Received:
    0
    Ratings:
    +0 / 0
    Home Country:
    Germany Germany
    is there any way to get the old gametrailers stuff back? because i liked having all category's in just 1 view. it's just not convenient for me to go through all the category's, so that i can see xbox or pc only stuff.

    some videos aren't even shown like invisible walls etc. and having real video titles not just game names for titles would be nice too ;)
     
  8. mat123

    mat123 Portal Pro

    Joined:
    February 28, 2009
    Messages:
    102
    Likes Received:
    19
    Gender:
    Male
    Ratings:
    +19 / 0
    Home Country:
    Slovenia Slovenia
    Show System Specs
    With this new version of gametrailers I can only watch SD. Is it possible to get HD videos?
     
  9. allanp81

    allanp81 Portal Pro

    Joined:
    October 24, 2006
    Messages:
    917
    Likes Received:
    33
    Ratings:
    +41 / 3
    I second that! Before it used to pop up when I selected a video and ask whether I wanted SD or HD, now it just plays SD with no option.
     
  10. mat123

    mat123 Portal Pro

    Joined:
    February 28, 2009
    Messages:
    102
    Likes Received:
    19
    Gender:
    Male
    Ratings:
    +19 / 0
    Home Country:
    Slovenia Slovenia
    Show System Specs
    I found the old Gametrailers with HD support on googlecode, if anyone wants to change it back.
    Just can't stand SD anymore :p

    Replace the Gametrailers code in OnlineVideoSites.xml, which is in ProgramData\Team MediaPortal\MediaPortal


    Code (Text):
    1. <Site name="GameTrailers" util="GenericSite" agecheck="false" enabled="true" lang="en">
    2.       <Description>Watch trailers, reviews, interviews and ingame footage for games from all the major platforms.</Description>
    3.       <Configuration>
    4.         <item key="fileUrlRegEx"><![CDATA[<src>(?<m0>[^<]+)</src>]]></item>
    5.         <item key="fileUrlFormatString"><![CDATA[{0}]]></item>
    6.         <item key="videoUrlRegEx"><![CDATA[http://.+/(?<m0>\d{4,10})]]></item>
    7.         <item key="videoUrlFormatString"><![CDATA[http://www.gametrailers.com/neo/?page=xml.mediaplayer.Mediagen&movieId={0}]]></item>
    8.       </Configuration>
    9.       <Categories>
    10.         <Category xsi:type="RssLink" name="All">http://www.gametrailers.com/rssgenerate.php?quality[either]=on&amp;orderby=newest&amp;limit=100</Category>
    11.         <Category xsi:type="RssLink" name="PC">http://www.gametrailers.com/rssgenerate.php?favplats[pc]=pc&amp;quality[either]=on&amp;orderby=newest&amp;limit=100</Category>
    12.         <Category xsi:type="RssLink" name="PS3">http://www.gametrailers.com/rssgenerate.php?favplats[ps3]=ps3&amp;quality[either]=on&amp;orderby=newest&amp;limit=100</Category>
    13.         <Category xsi:type="RssLink" name="PS2">http://www.gametrailers.com/rssgenerate.php?favplats[ps2]=ps2&amp;quality[either]=on&amp;orderby=newest&amp;limit=100</Category>
    14.         <Category xsi:type="RssLink" name="PSP">http://www.gametrailers.com/rssgenerate.php?favplats[psp]=psp&amp;quality[either]=on&amp;orderby=newest&amp;limit=100</Category>
    15.         <Category xsi:type="RssLink" name="Xbox360">http://www.gametrailers.com/rssgenerate.php?favplats[xb360]=xb360&amp;quality[either]=on&amp;orderby=newest&amp;limit=100</Category>
    16.         <Category xsi:type="RssLink" name="Xbox">http://www.gametrailers.com/rssgenerate.php?favplats[xbox]=xbox&amp;quality[either]=on&amp;orderby=newest&amp;limit=100</Category>
    17.         <Category xsi:type="RssLink" name="Wii">http://www.gametrailers.com/rssgenerate.php?favplats[wii]=wii&amp;quality[either]=on&amp;orderby=newest&amp;limit=100</Category>
    18.         <Category xsi:type="RssLink" name="GameCube">http://www.gametrailers.com/rssgenerate.php?favplats[gc]=gc&amp;quality[either]=on&amp;orderby=newest&amp;limit=100</Category>
    19.         <Category xsi:type="RssLink" name="Game Boy Advance">http://www.gametrailers.com/rssgenerate.php?favplats[gba]=gba&amp;quality[either]=on&amp;orderby=newest&amp;limit=100</Category>
    20.         <Category xsi:type="RssLink" name="Nintendo DS">http://www.gametrailers.com/rssgenerate.php?favplats[ds]=ds&amp;quality[either]=on&amp;orderby=newest&amp;limit=100</Category>
    21.         <Category xsi:type="RssLink" name="Mobile">http://www.gametrailers.com/rssgenerate.php?favplats[mob]=mob&amp;quality[either]=on&amp;orderby=newest&amp;limit=100</Category>
    22.       </Categories>
     
  11. sleepydog

    sleepydog Portal Member

    Joined:
    October 20, 2011
    Messages:
    6
    Likes Received:
    1
    Ratings:
    +1 / 0
    I tried to combine the new and old xml code to make one usable site: I quite like the old code, as it lists the HD videos, but without a search function it is often impractical. I tried to copy the search functionality from the new code into the old, but it always returns no files. I'm sure there is someone knowledgeable enough to make it work, it would be a great improvement.
     
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!