Gametrailers - support thread (3 Viewers)

Rick164

MP Donator
  • Premium Supporter
  • January 7, 2006
    1,335
    1,005
    Home Country
    Netherlands Netherlands
    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:
    <Site name="Gametrailers" util="GenericSite" agecheck="false" enabled="true" lang="en" lastUpdated="2011-06-12T00:00:00.0654986+02:00">
      <Configuration>
        <item key="dynamicCategoriesRegEx"></item>
        <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>
        <item key="videoListRegExFormatString"><![CDATA[http://mosii.gametrailers.com/getmediainfo4.php?hd=1&mid={0}]]></item>
        <item key="videoUrlRegEx"><![CDATA[umfilename=(?<url>[^&]*)]]></item>
        <item key="videoUrlFormatString"><![CDATA[http://trailers.gametrailers.com/gt_vault/{0}.flv]]></item>
        <item key="nextPageRegEx"><![CDATA[<a\shref="(?<url>[^"]*)"\sclass="Page">Next\s&raquo;</a>]]></item>
        <item key="playlistUrlFormatString"><![CDATA[http://trailers.gametrailers.com/gt_vault/{0}.flv]]></item>
        <item key="fileUrlRegEx"><![CDATA[umfilename=(?<m0>[^&]*)]]></item>
        <item key="fileUrlFormatString"><![CDATA[http://trailers.gametrailers.com/gt_vault/{0}.flv]]></item>
        <item key="baseUrl"><![CDATA[http://www.gametrailers.com]]></item>
        <item key="videoThumbFormatString"><![CDATA[{0}]]></item>
      </Configuration>
      <Categories>
        <Category xsi:type="RssLink" name="PC" thumb="" desc="">
          <SubCategories>
            <Category xsi:type="RssLink" name="Newest Media" thumb="" desc="">http://pc.gametrailers.com/#Content</Category>
            <Category xsi:type="RssLink" name="Trailers" thumb="" desc="">http://pc.gametrailers.com/?show=Trailers#Content</Category>
            <Category xsi:type="RssLink" name="Features" thumb="" desc="">http://pc.gametrailers.com/?show=Features#Content</Category>
            <Category xsi:type="RssLink" name="Previews" thumb="" desc="">http://pc.gametrailers.com/?show=Previews#Content</Category>
            <Category xsi:type="RssLink" name="Reviews" thumb="" desc="">http://pc.gametrailers.com/?show=Reviews#Content</Category>
            <Category xsi:type="RssLink" name="Interviews" thumb="" desc="">http://pc.gametrailers.com/?show=Interviews#Content</Category>
            <Category xsi:type="RssLink" name="Gameplay" thumb="" desc="">http://pc.gametrailers.com/?show=Gameplay#Content</Category>
          </SubCategories>http://pc.gametrailers.com/</Category>
        <Category xsi:type="RssLink" name="PS3" thumb="" desc="">
          <SubCategories>
            <Category xsi:type="RssLink" name="Newest Media" thumb="" desc="">http://PS3.gametrailers.com/#Content</Category>
            <Category xsi:type="RssLink" name="Trailers" thumb="" desc="">http://PS3.gametrailers.com/?show=Trailers#Content</Category>
            <Category xsi:type="RssLink" name="Features" thumb="" desc="">http://PS3.gametrailers.com/?show=Features#Content</Category>
            <Category xsi:type="RssLink" name="Previews" thumb="" desc="">http://PS3.gametrailers.com/?show=Previews#Content</Category>
            <Category xsi:type="RssLink" name="Reviews" thumb="" desc="">http://PS3.gametrailers.com/?show=Reviews#Content</Category>
            <Category xsi:type="RssLink" name="Interviews" thumb="" desc="">http://PS3.gametrailers.com/?show=Interviews#Content</Category>
            <Category xsi:type="RssLink" name="Gameplay" thumb="" desc="">http://PS3.gametrailers.com/?show=Gameplay#Content</Category>
          </SubCategories>http://PS3.gametrailers.com/</Category>
        <Category xsi:type="RssLink" name="Xbox360" thumb="" desc="">
          <SubCategories>
            <Category xsi:type="RssLink" name="Newest Media" thumb="" desc="">http://xbox360.gametrailers.com/#Content</Category>
            <Category xsi:type="RssLink" name="Trailers" thumb="" desc="">http://xbox360.gametrailers.com/?show=Trailers#Content</Category>
            <Category xsi:type="RssLink" name="Features" thumb="" desc="">http://xbox360.gametrailers.com/?show=Features#Content</Category>
            <Category xsi:type="RssLink" name="Previews" thumb="" desc="">http://xbox360.gametrailers.com/?show=Previews#Content</Category>
            <Category xsi:type="RssLink" name="Reviews" thumb="" desc="">http://xbox360.gametrailers.com/?show=Reviews#Content</Category>
            <Category xsi:type="RssLink" name="Interviews" thumb="" desc="">http://xbox360.gametrailers.com/?show=Interviews#Content</Category>
            <Category xsi:type="RssLink" name="Gameplay" thumb="" desc="">http://xbox360.gametrailers.com/?show=Gameplay#Content</Category>
          </SubCategories>http://xbox360.gametrailers.com/</Category>
            <Category xsi:type="RssLink" name="Wii" thumb="" desc="">
          <SubCategories>
            <Category xsi:type="RssLink" name="Newest Media" thumb="" desc="">http://wii.gametrailers.com/#Content</Category>
            <Category xsi:type="RssLink" name="Trailers" thumb="" desc="">http://wii.gametrailers.com/?show=Trailers#Content</Category>
            <Category xsi:type="RssLink" name="Features" thumb="" desc="">http://wii.gametrailers.com/?show=Features#Content</Category>
            <Category xsi:type="RssLink" name="Previews" thumb="" desc="">http://wii.gametrailers.com/?show=Previews#Content</Category>
            <Category xsi:type="RssLink" name="Reviews" thumb="" desc="">http://wii.gametrailers.com/?show=Reviews#Content</Category>
            <Category xsi:type="RssLink" name="Interviews" thumb="" desc="">http://wii.gametrailers.com/?show=Interviews#Content</Category>
            <Category xsi:type="RssLink" name="Gameplay" thumb="" desc="">http://wii.gametrailers.com/?show=Gameplay#Content</Category>
          </SubCategories>http://wii.gametrailers.com/</Category>
           <Category xsi:type="RssLink" name="PSP" thumb="" desc="">
          <SubCategories>
            <Category xsi:type="RssLink" name="Newest Media" thumb="" desc="">http://psp.gametrailers.com/#Content</Category>
            <Category xsi:type="RssLink" name="Trailers" thumb="" desc="">http://psp.gametrailers.com/?show=Trailers#Content</Category>
            <Category xsi:type="RssLink" name="Features" thumb="" desc="">http://psp.gametrailers.com/?show=Features#Content</Category>
            <Category xsi:type="RssLink" name="Previews" thumb="" desc="">http://psp.gametrailers.com/?show=Previews#Content</Category>
            <Category xsi:type="RssLink" name="Reviews" thumb="" desc="">http://psp.gametrailers.com/?show=Reviews#Content</Category>
            <Category xsi:type="RssLink" name="Interviews" thumb="" desc="">http://psp.gametrailers.com/?show=Interviews#Content</Category>
            <Category xsi:type="RssLink" name="Gameplay" thumb="" desc="">http://psp.gametrailers.com/?show=Gameplay#Content</Category>
          </SubCategories>http://psp.gametrailers.com/</Category>
            <Category xsi:type="RssLink" name="3DS" thumb="" desc="">
          <SubCategories>
            <Category xsi:type="RssLink" name="Newest Media" thumb="" desc="">http://3ds.gametrailers.com/#Content</Category>
            <Category xsi:type="RssLink" name="Trailers" thumb="" desc="">http://3ds.gametrailers.com/?show=Trailers#Content</Category>
            <Category xsi:type="RssLink" name="Features" thumb="" desc="">http://3ds.gametrailers.com/?show=Features#Content</Category>
            <Category xsi:type="RssLink" name="Previews" thumb="" desc="">http://3ds.gametrailers.com/?show=Previews#Content</Category>
            <Category xsi:type="RssLink" name="Reviews" thumb="" desc="">http://3ds.gametrailers.com/?show=Reviews#Content</Category>
            <Category xsi:type="RssLink" name="Interviews" thumb="" desc="">http://3ds.gametrailers.com/?show=Interviews#Content</Category>
            <Category xsi:type="RssLink" name="Gameplay" thumb="" desc="">http://3ds.gametrailers.com/?show=Gameplay#Content</Category>
          </SubCategories>http://3ds.gametrailers.com/</Category>
        <Category xsi:type="RssLink" name="Mobile" thumb="" desc="">
          <SubCategories>
            <Category xsi:type="RssLink" name="Newest Media" thumb="" desc="">http://mobile.gametrailers.com/#Content</Category>
            <Category xsi:type="RssLink" name="Trailers" thumb="" desc="">http://mobile.gametrailers.com/?show=Trailers#Content</Category>
            <Category xsi:type="RssLink" name="Features" thumb="" desc="">http://mobile.gametrailers.com/?show=Features#Content</Category>
            <Category xsi:type="RssLink" name="Previews" thumb="" desc="">http://mobile.gametrailers.com/?show=Previews#Content</Category>
            <Category xsi:type="RssLink" name="Reviews" thumb="" desc="">http://mobile.gametrailers.com/?show=Reviews#Content</Category>
            <Category xsi:type="RssLink" name="Interviews" thumb="" desc="">http://mobile.gametrailers.com/?show=Interviews#Content</Category>
            <Category xsi:type="RssLink" name="Gameplay" thumb="" desc="">http://mobile.gametrailers.com/?show=Gameplay#Content</Category>
          </SubCategories>http://mobile.gametrailers.com/</Category>
      </Categories>
    </Site>
     
    Last edited:

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    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?
     

    Snedig

    Portal Member
    July 1, 2009
    20
    3
    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.
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    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.
     

    Fub4r

    New Member
    April 5, 2008
    2
    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 ;)
     

    mat123

    Portal Pro
    February 28, 2009
    102
    19
    Home Country
    Slovenia Slovenia
    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:
    <Site name="GameTrailers" util="GenericSite" agecheck="false" enabled="true" lang="en">
          <Description>Watch trailers, reviews, interviews and ingame footage for games from all the major platforms.</Description>
          <Configuration>
            <item key="fileUrlRegEx"><![CDATA[<src>(?<m0>[^<]+)</src>]]></item>
            <item key="fileUrlFormatString"><![CDATA[{0}]]></item>
            <item key="videoUrlRegEx"><![CDATA[http://.+/(?<m0>\d{4,10})]]></item>
            <item key="videoUrlFormatString"><![CDATA[http://www.gametrailers.com/neo/?page=xml.mediaplayer.Mediagen&movieId={0}]]></item>
          </Configuration>
          <Categories>
            <Category xsi:type="RssLink" name="All">http://www.gametrailers.com/rssgenerate.php?quality[either]=on&amp;orderby=newest&amp;limit=100</Category>
            <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>
            <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>
            <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>
            <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>
            <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>
            <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>
            <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>
            <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>
            <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>
            <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>
            <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>
          </Categories>
     

    sleepydog

    Portal Member
    October 20, 2011
    6
    1
    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.
     

    Users who are viewing this thread

    Top Bottom