EscapistMagazine -> Zero Punctuation video list fix (1 Viewer)

kmcc049

Portal Member
October 4, 2008
7
1
Zero punctuation started putting italics around the video titles which meant that most videos weren't showing in the list. The solution is to change the videolist regex to

<div\sclass='filmstrip_video'><a\shref='(?<VideoUrl>[^']*)'><img\ssrc='(?<ImageUrl>[^']*)'></a><div\sclass='title'>[<i>]*(?<Title>[^<]*)[</i>]*</div><div\sclass='date'>Date:\s(?<Airdate>[^<]*)</div><div\sclass='comments'><a\shref='[^']*'>[^<]*</a></div></div>

from

<div\sclass='filmstrip_video'><a\shref='(?<VideoUrl>[^']*)'><img\ssrc='(?<ImageUrl>[^']*)'></a><div\sclass='title'>(?<Title>[^<]*)</div><div\sclass='date'>Date:\s(?<Airdate>[^<]*)</div><div\sclass='comments'><a\shref='[^']*'>[^<]*</a></div></div>

of course if he starts bolding them it will break again so its not the most robust solution but it does work.
 

kmcc049

Portal Member
October 4, 2008
7
1
Hi,

Zero punctuation seems broken again. On the media portal UI I get no videos. Using the generic site creator app I am able to get a working video url, but only after I updated the config from the webservice, as the one checked into the SVN trunk appears to be out of date.

I'm trying to work my own way through how things hang together but was just wondering about where the 'master' for onlinevideossites.xml lives as it seems you do check in changes to it quite regularly yet the webservice is able to serve out something different? It may be that this change just didn't get checked in?

Anyway I'll have to check to make sure that my onlinevideos is properly updated on my MP box and check the onlinevideossites.xml also, as based on what I have been able to see I believe it should be in a working state.

I also noticed that you have a LOL streams entry now, but this doesn't appear to be working for me either :(. I was thinking about taking a look at this later on tonight dependent on how long it takes me to figure out the problem with zero punctuation. From a quick look it looks like its taking the own3d streams and justin.tv streams. With season 3 starting up it would be cool to get the streams of the matches from lolesports.com (which I believe is backed by youtube and twitch). The VOD's would be great too. What is the story with making any changes to these classes? And what is your normal development process around testing and debugging as a cursory look didn't show up any test projects?
 

doskabouter

Development Group
  • Team MediaPortal
  • September 27, 2009
    4,535
    2,895
    Nuenen
    Home Country
    Netherlands Netherlands
    That's quite a story.

    I'll try to answer some of the questions:

    The master onlinevideosites.xml is on offbyone's server, that is the one everybody gets the updates from.
    The one in svn should (imo) be a subset of what is in the master xml (not everybody contributing has svn write-access), and that's most of the time true.
    However, I'm not always consequent in updating the svn (I do for non-generic sites, but generally not for generic sites). The thing is, Escapist started as a non-generic one, and over time, I converted it to a generic one and forgot to delete the entry in onlinevideos. *shame*

    And on software updates: normally it's the responsability of the site-owner (me in this case) to do the updates in svn (this can be based ofcourse on user-input) and republish the site.

    And no, we don't have an official test/debug-tool. I guess it's more or less every developers own choice as how to do those.

    So concluding (guessing you don't have write access to svn), if you have any improvements I'll be happy to incorporate/publish them, but if you think it's too difficult to get it right, I'll check/fix things for you
     

    kmcc049

    Portal Member
    October 4, 2008
    7
    1
    Hmm escapist is working now. It auto updated before I tried it though. I think what may have happened is that the new version pushed the old xml from svn over the top of the working xml and then the next time it auto updated it fixed it?

    I have a fixed regex for the lol streams video list.

    <tr.*?style="cursor.*?pointer;".*?onclick="view_stream\('(?<VideoUrl>[^']*)','[^,]*,'(?<hoster>[^']*)'\);".*?onMouseOver="show_preview\('[^']*',(?<ImageUrl>[^,]*),[^,]*,'[^']*','(?<Description>[^']*)'\);"[^>]*>\s<a\shref="[^"]*"\sstyle="display:none;">[^<]*</a>\s<td\sclass="live-td"><img[^>]*></td>\s<td\sclass="stream-name-td">(?<Title>[^<]*)<div[^>]*></div></td>\s<td\sclass="current-viewers-td"><font\scolor="green">(?<viewers>[^<]*)</font></td>\s<td\sclass="region-td"><img\ssrc="[^"]*"\stitle="(?<country>[^"]*)"\salt="[^"]*".*?/></td>\s</tr>
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,535
    2,895
    Nuenen
    Home Country
    Netherlands Netherlands
    Removed escapist from svn, so no more confusion!

    And I updated the league of legends (only tested justin streams...)
    In the end, I didn't use your regex, because I always try to avoid things like .*?, because if no good match can be found, the latter part matches the next video, and that can give some strange results.
     

    Users who are viewing this thread

    Top Bottom