Fixed youtube playback

Discussion in 'OnlineVideos' started by Vattenmelon, August 4, 2008.

Thread Status:
Not open for further replies.
  1. Vattenmelon

    Vattenmelon Portal Pro

    Joined:
    June 1, 2007
    Messages:
    159
    Likes Received:
    22
    Ratings:
    +22 / 0
    Home Country:
    Norway Norway
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Spragleknas
    • Team MediaPortal
    • Administrator

    Spragleknas Administrator

    Joined:
    December 21, 2005
    Messages:
    9,472
    Likes Received:
    1,385
    Gender:
    Male
    Occupation:
    Occupied
    Location:
    Located
    Ratings:
    +1,892 / 12
    Home Country:
    Norway Norway
    Show System Specs
    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!
     
  4. acun

    acun Portal Member

    Joined:
    November 25, 2007
    Messages:
    7
    Likes Received:
    0
    Ratings:
    +0 / 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!
     
  5. Vattenmelon

    Vattenmelon Portal Pro

    Joined:
    June 1, 2007
    Messages:
    159
    Likes Received:
    22
    Ratings:
    +22 / 0
    Home Country:
    Norway Norway
    Not that I know of... as far as I can see the search function uses the rss feed api as it is documented.
     
  6. Adam West

    Adam West Portal Member

    Joined:
    August 14, 2008
    Messages:
    9
    Likes Received:
    0
    Ratings:
    +0 / 0
    Home Country:
    United Kingdom United Kingdom
    Thanks for this, will be trying it later

    Edit: works great, thanks
     
  7. rajack

    rajack Portal User

    Joined:
    July 28, 2006
    Messages:
    5
    Likes Received:
    0
    Ratings:
    +0 / 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
     
  8. Spragleknas
    • Team MediaPortal
    • Administrator

    Spragleknas Administrator

    Joined:
    December 21, 2005
    Messages:
    9,472
    Likes Received:
    1,385
    Gender:
    Male
    Occupation:
    Occupied
    Location:
    Located
    Ratings:
    +1,892 / 12
    Home Country:
    Norway Norway
    Show System Specs
    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 :))
     
  9. armandp
    • Premium Supporter

    armandp Retired Team Member

    Joined:
    April 6, 2008
    Messages:
    990
    Likes Received:
    584
    Gender:
    Male
    Occupation:
    Application Designer
    Location:
    Zoetermeer
    Ratings:
    +616 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    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.

    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 :)
     
  10. Vattenmelon

    Vattenmelon Portal Pro

    Joined:
    June 1, 2007
    Messages:
    159
    Likes Received:
    22
    Ratings:
    +22 / 0
    Home Country:
    Norway Norway
    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).
     
  11. rajack

    rajack Portal User

    Joined:
    July 28, 2006
    Messages:
    5
    Likes Received:
    0
    Ratings:
    +0 / 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
     
Loading...
Thread Status:
Not open for further replies.

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!