Gametrailers - support thread (1 Viewer)

Rick164

Super User
  • Team MediaPortal
  • Super User
  • January 7, 2006
    1,335
    1,005
    Netherlands Netherlands
    Country flag
    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,982
    3,703
    Stuttgart
    Germany Germany
    Country flag
    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
    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,982
    3,703
    Stuttgart
    Germany Germany
    Country flag
    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
    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
    Slovenia Slovenia
    With this new version of gametrailers I can only watch SD. Is it possible to get HD videos?
     

    allanp81

    Portal Pro
    October 24, 2006
    917
    41
    With this new version of gametrailers I can only watch SD. Is it possible to get HD videos?
    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.
     

    mat123

    Portal Pro
    February 28, 2009
    102
    19
    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

    Similar threads
    OP Title Forum Replies Date
    rsbrux 1.27.0 Supported SQL Server version(s) / TV Service dependency on SQL Server / Wait for TV Server startup Installation, configuration support 4
    T [solved] WMA support General 22
    M Native Unicable Support Newcomers Forum 4
    R MP Support of Transparent Thumbs General Support 1
    J no TV support on 1.25 download Installation, configuration support 1
    horned_reaper [solved] HID commands are not processed when multiple applications with HID support are open General Support 16
    horned_reaper [solved] Add support for Bluetooth events Improvement Suggestions 2
    CyberSimian Support for control.isvisible() in expressions MediaPortal 1 8
    morpheus_xx [WiP] OnlineVideos: New browser based playback support using WebDriver, new Amazon siteutil MediaPortal 2 14
    M 2nd (Touch-)Display Support on MediaPortal 2 such MPDisplay++? General 5
    J Support waipu TV TV-Server 2
    doskabouter WebDAV support OnlineVideos 0
    K Multichannel audio and subtitles for TV not properly supported General Support 4
    CyberSimian Support pack for Ortek VRC-1100 and Hama 00052451 Remotes 6
    cbr954rr [Finished] [MP2-801] Support for tag image extraction Archive 7
    catavolt [solved] FanartHandler - Skin - Holiday and Spotlight support Fanart Handler 51
    C Drive Type is not supported by system Allgemeines Support- und Diskussionsforum 3
    raffe [solved] Export tool and import support from MP-TVSeries & Moving Pictures to MP2 General 25
    morpheus_xx General Testing TVE 3.5 Sat>IP support (MP2 only) TV Engine 47
    E M3U Playlist and EPG Support/Configuration Installation, configuration support 1
    G Mediaportal2 supported formats General 1
    M [solved] Stub Support General 11
    morpheus_xx [Finished] Adding 64 bit support to MP2-Client MediaPortal 2 31
    ajs [Action Required] MP 1.28 Pre Release thread MediaPortal 1 201
    ajs [Action Required] MP 1.27 Final Release thread MediaPortal 1 173

    Similar threads

    Top Bottom