[new plugin] Netflix Wrapper (1 Viewer)

sytone

Portal Member
April 17, 2013
49
70
99
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,648
    1,120
    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
    99
    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,745
    7,174
    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
    99
    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
    99
    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
    99
    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

    Similar threads

    You are writing a lot, but almost nothing concrete to understand your issue you need support for. I got you want to make a Kodi client work with a MP2 server (last is just a guess, because it’s a MP2 thread). So which part is not working or what do you not understand in the guides? Have you found the related thread for Kodi clients?
    You are writing a lot, but almost nothing concrete to understand your issue you need support for. I got you want to make a Kodi...
    I have spent the last few weeks with TVHeadend, TVMosaic and NextPVR on Mac, WIndows and Linux platforms where available. Only...
    Replies
    1
    Views
    97
    • Sticky
    Good job, nice release as usual (y)
    Good job, nice release as usual (y)
    We are proud to present MediaPortal 2.4 MediaPortal 2.4 is a full-blown media center software that addresses most common user...
    Replies
    5
    Views
    2K
    I've been using version 1.2.2.0 for years and have found no need to upgrade to newer version. I hate it that skins loose compatibility with almost every new version. And new skins are too 'fancy' for my taste. I use a customized version of the default wide skin with only Videos and TV in the main menu. I use mediaportal for recording...
    I've been using version 1.2.2.0 for years and have found no need to upgrade to newer version. I hate it that skins loose...
    I've been using version 1.2.2.0 for years and have found no need to upgrade to newer version. I hate it that skins loose...
    Replies
    0
    Views
    768
    Too bad :(. You guys do everything in your free time, but you are a team and it’s not gentle to leave the team without a note. As an user I can not complain too much about a free product.
    Too bad :(. You guys do everything in your free time, but you are a team and it’s not gentle to leave the team without a note. As...
    For now I went ahead and implemented the MP2 Plugin ;) (Attached Zip) You need to go into Settings in MP2 and log in to the Amazon...
    Replies
    26
    Views
    2K
    Some sort of polling is the only way I think, it's just a question of how smart we can make it, e.g. check recordings returned by the API against the database at some regular interval and additionally shortly after a schedule is due to finish (or start if TV Mosaic supports playback of ongoing recordings) to get them in the database...
    Some sort of polling is the only way I think, it's just a question of how smart we can make it, e.g. check recordings returned by...
    The current TV engine (TVE3) for Media Portal 1 and 2 was developed long time before and is not state of the art any more...
    Replies
    235
    Views
    19K
    Top Bottom