[new plugin] Netflix Wrapper (1 Viewer)

sytone

Portal Member
April 17, 2013
49
70
101
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
 

Attachments

  • MediaPortal.Plugins.NetflixWrapperGui.1.0.0.0.zip
    221.4 KB
  • NetflixWrapper.1.0.0.3.mpe1
    231.9 KB
  • NetflixWrapper.1.0.0.4.mpe1
    233 KB
Last edited:

emphatic

Design Group
  • Team MediaPortal
  • August 25, 2006
    3,717
    1,178
    Alingsås
    Home Country
    Sweden Sweden
    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
     

    sytone

    Portal Member
    April 17, 2013
    49
    70
    101
    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.
     

    geoffstewart

    MP Donator
  • Premium Supporter
  • October 12, 2008
    346
    112
    Ottawa
    Home Country
    Canada Canada
    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
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    I can look at the moving pictures approach and hook that in as well I guess. Ill add it to the list!
    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.
     

    sytone

    Portal Member
    April 17, 2013
    49
    70
    101
    Home Country
    Barbados Barbados
    - 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.

    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.

    - 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"?

    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 :)

    - The generated categories work great!

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

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

    Amazing start!

    Thanks! I appreciate the comment more than you realize.[DOUBLEPOST=1395780756][/DOUBLEPOST]
    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.

    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:

    geoffstewart

    MP Donator
  • Premium Supporter
  • October 12, 2008
    346
    112
    Ottawa
    Home Country
    Canada Canada
    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
     

    sytone

    Portal Member
    April 17, 2013
    49
    70
    101
    Home Country
    Barbados Barbados
    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.

    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.
     

    sytone

    Portal Member
    April 17, 2013
    49
    70
    101
    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 :)
     

    Users who are viewing this thread

    Top Bottom