1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[new plugin] Netflix Wrapper

Discussion in 'MediaPortal 1 Plugins' started by sytone, March 24, 2014.

  1. sytone

    sytone Portal Member

    Joined:
    April 17, 2013
    Messages:
    49
    Likes Received:
    31
    Ratings:
    +52 / 0
    Home Country:
    Barbados Barbados
    Hi,

    So I have a prototype plugin for Netflix that has the controls embedded in Media Portal. No external windows or IE instances.

    I have attached this prototype to this thread, the code is a bit of a mess as I had to try multiple approaches to get the embedding to work and work on wrapping the Netflix pages with a MP looking UI as the API is no longer available.

    As stated this is a prototype, it is not fully functional in all aspects but wraps the Netflix Home page and allows playback in Media Portal. Expect problem and attach the Netflix-wrapper.log file if you know of an issue not highlighted here so I can try and work it out and add it.

    Also note this is 1.6 at the moment, have not done a local upgrade to 1.7.

    Installation
    1. Extract the DLL to "plugins\Windows" in your media portal installation.
    2. Copy the StreamedMP folder to your skins directory.
    3. Ensure you have logged into Netflix using Internet Explorer on the machine running MP.
    Current Functionality
    • Play Pause ability when watching (Sometimes a bit delayed)
    • Fast forward and rewind when watching. (Press play/pause to start playback at that point)
    • Process your first profiles home page to get categories and content.
    • Uses Netflix images and data for information and caches them to reduce calls.

    Known Issues / Todo:
    Using Trello to track the work now, use the link below and if you join Trello you can also comment.

    Thanks to the Moving Pictures team as I used there project as a working example and some of the code that they have for integrating with MP.

    Screen Shots
    CategoriesView.png EpisodeView.png MovieView.png SeriesView.png

    Change Log:
    1.0.0.4
    Added genre loading, if there are no media items it will load them, if there are some and you want ot see if there are more press enter and it will force a load.
    Added progress bar so you can see when background work is going on.





    1.0.0.3
    Fixed the race condition on load that can cause a crash.
    Fixed blocking arrow/enter commands in the rest of Media Portal.

    1.0.0.2
    Added installer
    Added My List parsing for the UI


    Download
     

    Attached Files:

    Last edited: June 14, 2014
    • Thank You! Thank You! x 9
    • Like Like x 5
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. emphatic
    • Team MediaPortal

    emphatic Design Group

    Joined:
    August 25, 2006
    Messages:
    3,538
    Likes Received:
    825
    Gender:
    Male
    Occupation:
    Surface treatment
    Location:
    Alingsås
    Ratings:
    +1,074 / 2
    Home Country:
    Sweden Sweden
    Show System Specs
    Perhaps adding a few screenshots will get you more attention? I don't have a Netflix account myself because I'm in Sweden and the whole API thing, but this does sound like a reason to maybe sign up for a test subscription.

    Would it be possible to connect to Trakt as well?

    Emph
     
    • Agree Agree x 1
  4. sytone

    sytone Portal Member

    Joined:
    April 17, 2013
    Messages:
    49
    Likes Received:
    31
    Ratings:
    +52 / 0
    Home Country:
    Barbados Barbados
    I can look at the moving pictures approach and hook that in as well I guess. Ill add it to the list!

    As for other countries, I will need a bit of help to manage the pages HTML and content to determine how to map to movies on the page as if I touch my account my family will kill me :)

    I am considering dropping back to PowerShell scripts to make that part more flexible and faster to update as I can dynamically pull them down when changes are made without a full re-install. I am probably going to use a hosted PS instance for this process.

    Ill add some shots tonight.
     
    • Thank You! Thank You! x 2
  5. geoffstewart
    • Premium Supporter

    geoffstewart MP Donator

    Joined:
    October 12, 2008
    Messages:
    346
    Likes Received:
    56
    Location:
    Ottawa
    Ratings:
    +67 / 0
    Home Country:
    Canada Canada
    Show System Specs
    good stuff here... thanks for your efforts.

    I just installed it and gave it a whirl. Here's what I noticed:

    - First time use says that login failed. I went and re-logged into IE (logged out and logged back in) and went back to the NW plugin and it worked... might just be a quirk of first time use. Subsequent launches of the NW seem to work fine.

    - The MyList, New Arrivals, Popular on Netflix, Watch Instantly, Just For Kids categories show nothing on the right when selected... is that what you meant by "other categories are placeholders for the moment"?

    - The generated categories work great!

    - I could select a movie, play it, stop it and return to the main plugin screen.

    Amazing start!

    Cheers.

    Geoff
     
    • Like Like x 1
    • Thank You! Thank You! x 1
  6. ltfearme
    • Premium Supporter

    ltfearme Community Plugin Dev

    Joined:
    June 10, 2007
    Messages:
    6,316
    Likes Received:
    4,096
    Gender:
    Male
    Occupation:
    Software Test Engineer
    Location:
    Sydney
    Ratings:
    +5,161 / 0
    Home Country:
    Australia Australia
    You don't need to hook into anything, the trakt plugin will hook into you ;) If you provide a way for an external plugin to know that you have started a video, stopped a video and watched a video that would be a good start. The trakt plugin will obviously also need to know what the current media is as well.

    Source for the TraktPlugin is here: https://github.com/Technicolour/Trakt-for-Mediaportal
    You can probably take a look at the OnlineVideos handler and do something similar, they have an event called TraktVideoPlayback:
    https://github.com/Technicolour/Tra...raktPlugin/TraktHandlers/OnlineVideos.cs#L135

    You can look at the OnlineVideos source to see how and when that event should be fired.
     
    • Thank You! Thank You! x 1
  7. sytone

    sytone Portal Member

    Joined:
    April 17, 2013
    Messages:
    49
    Likes Received:
    31
    Ratings:
    +52 / 0
    Home Country:
    Barbados Barbados
    I am not surprised :) I have not cleaned out my system for a while, I need to take the cookies from the login process and pass them to the WebBrowser control. This is on the todo list.

    Yes it is, I have the logic for My list added but not wired it up in a background thread to load nor do a pull when selected. On the todo :)

    Yay, passed the 'works on my machine' test!

    Thanks! I appreciate the comment more than you realize.[DOUBLEPOST=1395780756][/DOUBLEPOST]
    Ill try and have a look this evening at this, I have a fair bit of data already from the NF feed, so I am hoping it is easy to pass this over.
     
    Last edited: March 25, 2014
    • Like Like x 2
  8. geoffstewart
    • Premium Supporter

    geoffstewart MP Donator

    Joined:
    October 12, 2008
    Messages:
    346
    Likes Received:
    56
    Location:
    Ottawa
    Ratings:
    +67 / 0
    Home Country:
    Canada Canada
    Show System Specs
    Hi again,

    One more item that I noticed after playing with the plugin again last night. It seems when I exit the plugin, the ability to use my remote in the rest of MediaPortal is affected. I use a HT remote (MX-550) with a USB-UIRT that translates IR messages into key strokes using IRSS translator.

    I think that the plugin is latching onto the ENTER, left, right, etc. keys. Is it possible that it's not releasing after I exit the plugin?

    I had to exit MediaPortal and restart it to regain control with my remote.

    Cheers.

    Geoff
     
  9. sytone

    sytone Portal Member

    Joined:
    April 17, 2013
    Messages:
    49
    Likes Received:
    31
    Ratings:
    +52 / 0
    Home Country:
    Barbados Barbados
    I am using the standard OnAction override. There may be a possibility that the window was not disposed properly when you exited a movie and the keys you mentioned are handled by the OnAction override for the window so it makes sense that this may be the cause. Did you try other buttons than Pause (Enter/Space) and skip forward and back (Arrows)?

    I am removing the focus handler on removal so that should be out of the picture. I will review the code tonight to see if I can see anything that may cause this. I also have the MyList functionality in place so that should be out tonight with a new build.
     
    • Like Like x 1
  10. sytone

    sytone Portal Member

    Joined:
    April 17, 2013
    Messages:
    49
    Likes Received:
    31
    Ratings:
    +52 / 0
    Home Country:
    Barbados Barbados
    ok, I have made an installer, can someone try it out? Also My List is now returned and the streams are shown in the UI. I mad a few internal changes for file locations so let me know if caching goes crazy :)
     
    • Thank You! Thank You! x 1
  11. geoffstewart
    • Premium Supporter

    geoffstewart MP Donator

    Joined:
    October 12, 2008
    Messages:
    346
    Likes Received:
    56
    Location:
    Ottawa
    Ratings:
    +67 / 0
    Home Country:
    Canada Canada
    Show System Specs
    I've tried this installer, but it makes MP crash when I click on MyList.

    Logs attached.
     
Loading...

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

  • 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.

             

  • Like Us On Facebook

  • 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!