Fixed youtube playback (1 Viewer)

Status
Not open for further replies.

Spragleknas

Moderator
  • Team MediaPortal
  • December 21, 2005
    9,474
    1,822
    Located
    Home Country
    Norway Norway
    Even though I have not tested this: Great work!

    Now feel free to fix:
    - My Musicvideos
    - My Trailers (I think somebody did that already?)
    - Whatever else that is not working with this plugin

    :D

    Seriously, MediaPortal has lost a lot when it comes to playing online content lately, and every contribution to turn this "trend" around is very welcome!
     

    acun

    Portal Member
    November 25, 2007
    7
    0
    Yeap is working.
    But.....is always a but :) i asked that a thousant times .
    Is there a way to search youtube but NOT from rss feed?
    Because the result is like 15 links .from 300.
    Thank u for making this work!
     

    Vattenmelon

    Portal Pro
    June 1, 2007
    159
    22
    Home Country
    Norway Norway
    Yeap is working.
    But.....is always a but :) i asked that a thousant times .
    Is there a way to search youtube but NOT from rss feed?
    Because the result is like 15 links .from 300.
    Thank u for making this work!

    Not that I know of... as far as I can see the search function uses the rss feed api as it is documented.
     

    rajack

    Portal Member
    July 28, 2006
    5
    0
    GREAT job Vattenmelon,

    Since the changes to onlinevideo were minor, could you please post the line(s) of code that got youtube working again?

    Thanks,

    rj
     

    Spragleknas

    Moderator
  • Team MediaPortal
  • December 21, 2005
    9,474
    1,822
    Located
    Home Country
    Norway Norway
    Vattenmelon:
    I haven't used MyOnlineVideos (for a long time), but I've gotten the impression that most sections are broken in some way or another.
    Perhaps a "stand alone" YouTube would be a good idea? Are you (or anyone else) interested in creating this?

    (I'd certainly love it :))
     

    armandp

    Retired Team Member
  • Premium Supporter
  • April 6, 2008
    990
    620
    Zoetermeer
    Home Country
    Netherlands Netherlands
    Even though I have not tested this: Great work!

    Now feel free to fix:
    ...
    - My Trailers (I think somebody did that already?)
    ...

    My Trailers is being revived as we speak ;) mytrailers - Google Code
    The problem with online content most of the time is that you are "scraping" or pulling data from feeds that are bound to change sooner or later . I've setup My Trailers much like OnlineVideo.. one gui different sources.. (only trailer source btw). Will see if I can do something similar later for My Musicvideos.

    Vattenmelon:
    I haven't used MyOnlineVideos (for a long time), but I've gotten the impression that most sections are broken in some way or another.
    Perhaps a "stand alone" YouTube would be a good idea? Are you (or anyone else) interested in creating this?
    (I'd certainly love it :))

    Indeed.. I think the best approach is to group "similar" video content into one plugin.. (trailers, music videos, youtube etc... ) easy to maintain. OnlineVideo is/was great but it's scope is to big :) a YouTube dedicated plugin sounds like a good idea :)
     

    Vattenmelon

    Portal Pro
    June 1, 2007
    159
    22
    Home Country
    Norway Norway
    GREAT job Vattenmelon,

    Since the changes to onlinevideo were minor, could you please post the line(s) of code that got youtube working again?

    Thanks,

    rj

    Some days since i did it... but i believe it was at line 350 in YouTubeUtil.cs where i replaced:
    loRegex = new Regex("BASE_YT_URL\":.*t\":\\s\"([^\"]*)"); with the following:
    loRegex = new Regex(".*t\":\\s\"([^\"]*)");



    After looking some more on the code, I see that I commented out the loggedIn part, so I guess my version don't work for people that are logging in with their user.


    //if(isLoggedIn()){
    // loRegex = new Regex("new SWFObject\\([^&]*&video_id=.*[&]l=(.*)[&]t=([^\"]*)");

    //}else{
    //loRegex = new Regex("BASE_YT_URL:[^,]*,video_id:.*[,]l:'(.*)'[,]t:'([^']*)");
    // loRegex = new Regex("BASE_YT_URL\":.*t\":\\s\"([^\"]*)"); //den som ble brukt
    loRegex = new Regex(".*t\":\\s\"([^\"]*)");

    armandp and Spragleknas: I agree, maintaining a plugin like onlinevideos is timeconsuming. I'll guess a working youtube plugin is the most important when it comes to playing online content. (It's the only site I use in the onlinevideos, and I guess it is for many other people too).
     

    rajack

    Portal Member
    July 28, 2006
    5
    0
    FABULOUS!!!!

    That did the trick.

    BTW, Google's developer documentation states that the YouTube API is being phased-out, and developers should start using the YouTube option of the Google Data API, which appears to require authentication before the APIs will respond.

    Thanks very much for the regex fix. Hopefully it will work long enough to figure out where Google is headed with their APIs.

    rj
     
    Status
    Not open for further replies.

    Users who are viewing this thread

    Top Bottom