Minor improvement request in the Configuration->Sites dialog (1 Viewer)

xfx

Portal Pro
February 1, 2011
85
9
Santiago, Dominican Republic
Home Country
Spain Spain
I was just checking the blog.tvalacarta.info/canales/ web site and it looks like, because of the way OnlineVideos works, it won't be possible to add it, unless you add every channel one by one.

Mainly this is because each channel redirects you to the channel's own web site and each one uses a different method/player to show the video, making it impossible to come up with a "single and magical" regex that would work for all of them.

That is why the XBMC plugin uses a different class to parse each one of the sites.
 

offbyone

Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    Every WebSite should be its own site in OnlinVideos, there is no problem with that. If you have code to share amongst them, you can inherit the SiteUtils.
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,566
    2,937
    Nuenen
    Home Country
    Netherlands Netherlands
    I second that, and from experience I can tell that you're making it unnecessarily complex if you do want to put all of them in one util.

    Besides, users can always make a group in onlinevideos (f.e. "tvalacarta") and put all the sites in there
     

    xfx

    Portal Pro
    February 1, 2011
    85
    9
    Santiago, Dominican Republic
    Home Country
    Spain Spain
    Ok, understood.
    As time permits it, I'll try to add them one by one.

    --------------------------------

    I have created a Site for "América TV" and, although it does return a valid link to the FLV files and I can play those links directly in both VLC and WMP, the videos don't play under MP. What am I doing wrong?

    Code:
    <Site name="América TV" util="GenericSite" agecheck="false" enabled="true" lang="es">
          <Description>Canal de Televisión del Perú que ofrece su programación y transmisión en vivo mediante Internet</Description>
          <Configuration>
            <item key="dynamicCategoriesRegEx"><![CDATA[<li><a\shref="javascript:;"\sclass="normal-tab[^"]*"\srel="[^"]*"\sname="(?<url>[^"]*)"><span>(?<title>[^<]*)</span></a></li>]]></item>
            <item key="dynamicCategoryUrlFormatString"><![CDATA[http://www.americatv.com.pe/portal/videostaxonomia/{0}]]></item>
            <item key="videoListRegEx"><![CDATA[<img\ssrc="(?<ImageUrl>[^"]*)"\s*/></a><p><a\shref="(?<VideoUrl>[^"]*)">(?<Title>[^<]*)</a>]]></item>
            <item key="playlistUrlRegEx"><![CDATA[file=(?<url>[^&]*)&]]></item>
            <item key="baseUrl"><![CDATA[http://www.americatv.com.pe/portal/multimedia]]></item>
          </Configuration>
        </Site>
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,566
    2,937
    Nuenen
    Home Country
    Netherlands Netherlands
    Are they all referring to youtube/other known video-hosters? If so, set "ResolveHoster" to "FromUrl", and you're good to go!

    Mind you, this option doesn't resolve to the final url in the generic site-parser, but it will do so in mediaportal.
     

    xfx

    Portal Pro
    February 1, 2011
    85
    9
    Santiago, Dominican Republic
    Home Country
    Spain Spain
    Me again... sorry to be a pest!

    I've decided to drop the Site Creator tool and started working on a plugin. Hopefully, the plugin will provide access to all the sites (and their videos) in the "TV A La Carta" web site.
    So far I have had no problems parsing the web sites but I'm not sure how to "extract"/"detect" the actual URL for the video file... on almost any site I've been working on.

    For example, consider the video at the following page: Vídeos de Noticias de la Mañana - 16 de Enero de 2.012
    It would appear that the link to the video is taken from an XML file: http://www.antena3.com/chapterxml//4/1000896/2012/01/16/00001.xml
    So, if I'm doing things correctly, the URL to the video should be: rtmp://antena3videofs.fplive.net/antena3video/mp_seriesh2/2012/01/16/00001/002.mp4

    And what now? What do I do with that URL? Should I just return it from within the getUrl() function?
    I have tried returning that URL and MP doesn't play the video... it displays the "buffering" message and then the "Unable to play the video. No Url." error.
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    Check the MPUrlSource.log it may tell you more about the rtmp connection problems. You probably need more parameters for that. Check other utils that use rtmp.
     

    xfx

    Portal Pro
    February 1, 2011
    85
    9
    Santiago, Dominican Republic
    Home Country
    Spain Spain
    Thank you for the information -- oddly enough, it is working fine now. Maybe there was some problem with the connection.
    I have an additional problem with another web site but, before asking for help/suggestions I wanted to make sure that this is the right place to do so... or would it be better if I start a separate thread?
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    Looking at the topic, I guess a new thread would be appropriate. You can also join our IRC channel , mostly in the evening we are there :)
     

    Users who are viewing this thread

    Top Bottom