Netflix Plugin (first release available) (2 Viewers)

rayrob

Portal Member
August 7, 2006
13
0
Thank You Patrick!

I'm still looking it over, but here's a screen shot showing what doesn't seem to be functioning in the version that patrick sent to me.

netflixplugin.jpg


Notice that the synopsis is not functioning.

I don't know any programming Hobbes, but if I can help you out, let me know.
 

hobbes487

Portal Pro
August 25, 2005
208
3
Home Country
United States of America United States of America
So I have begun developing the Netflix program from scratch, using Gazpacho King's source as a guide. (Mostly to help me learn C# and MP)

So far I have been able to retrieve the queue and any of the other RSS feeds from netflix and display them with the description of each movie. The problem I am stuck on right now is how to display the image to go along with the description. Do I have to download the image and then display it from disk, or can I just display it with a URL?

next problem is how do i grab info entered into the plugin configuration (i.e. Netflix ID)? and how do i set some sort of cookie so it remembers the user logged in? this is neccessary for adding and removing items from queue.


Any help would be appreciated.
 

rayrob

Portal Member
August 7, 2006
13
0
hobbes487 said:
next problem is how do i grab info entered into the plugin configuration (i.e. Netflix ID)? and how do i set some sort of cookie so it remembers the user logged in? this is neccessary for adding and removing items from queue.


Any help would be appreciated.

Not sure if this will help, but in the original plug in, i had to log in to Netflix in a web browser, then open the cookie and find the "shopperid" which i then entered into the plug in. I'm supposing that the shopperid is always the same for the logged in user, and that is how a person retrieves info from their netflix stuff without being logged in.

GazpachoKing also made mentions of the Netflixaddict Project in the readme file concerning parsing code.
http://sourceforge.net/projects/netflixaddict

I don't know if that will help, but as far as the shopperid tag, the plug in asked me for the cookie directory to scan for the cookie and retrieve the shopperid. I didn't know where the directory was (using Firefox) so I just opened in firefox and copy and pasted the ID. It worked.

I can't find any other plug ins or whatever that are written in C# or C++ . I have found several plug ins though that were based on php or html.
[/url]
 

patrick

Portal Pro
April 20, 2005
608
45
Southeast
Home Country
United States of America United States of America
hobbes487 said:
The problem I am stuck on right now is how to display the image to go along with the description. Do I have to download the image and then display it from disk, or can I just display it with a URL?

Download the image.
Well, check if the image has already been download,
if so then display it from the disk, if not download it first,
then display it from the disk.
You do not want to download the same image over and
over every time you look at it.

The previous version looks like it downloaded to a thumbs folder:
MediaPortal\Thumbs\Netfix With a filename of the Netflix MovieID.jpg
See the methods: ShowDetails and GetImagesPath in the
exiting plugin.

hobbes487 said:
next problem is how do i grab info entered into the plugin configuration (i.e. Netflix ID)? and how do i set some sort of cookie so it remembers the user logged in? this is neccessary for adding and removing items from queue.

How/Where to load/save settings is up to you.
The last version it looks like saved them in a SQLite database
See the GUIConfiguration form and Database class in the
existing code that saves settings.
Also see the OnPageLoad method where the shopperid is
loaded from the database and used.

HTH,
patrick
 

hobbes487

Portal Pro
August 25, 2005
208
3
Home Country
United States of America United States of America
patrick said:
How/Where to load/save settings is up to you.
The last version it looks like saved them in a SQLite database
See the GUIConfiguration form and Database class in the
existing code that saves settings.
Also see the OnPageLoad method where the shopperid is
loaded from the database and used.

HTH,
patrick

The way it was previously done seems complicated. Is there no way to just grab the info and assign it to a variable? Also, do I have to create the whole configuration dialog box too? Seems complicated. :(

btw...I have the cover images working. So as of right now you can look at your queue and any of the other rss feeds and it will show the cover art and description for each movie listed.
 

hobbes487

Portal Pro
August 25, 2005
208
3
Home Country
United States of America United States of America
new update: user can now add movies from the RSS feeds (i.e. top 100, recommended, etc) to the end or the beginning of their queue.

i also got the cookie thing working, but I still cant figure out the whole configuration thing, so until i do, the netflixID is hardcoded. so the sooner i get it figured out, the sooner i can release my beta version. :D
 

patrick

Portal Pro
April 20, 2005
608
45
Southeast
Home Country
United States of America United States of America
hobbes487 said:
Is there no way to just grab the info and assign it to a variable? Also, do I have to create the whole configuration dialog box too? Seems complicated. :(

Grab the info from where? :D

Seems like at some point the user has to be able to enter this shopperid value.
You could just have it in a text file and read it from there, up to you.
May be a little easier for users to enter it on a screen somewhere though.

Without the complexity of the database you can use the MP settings.
IIRC would look close to:

Code:
    protected virtual void LoadSettings()
    {
      using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings("MediaPortal.xml"))
      {
          _shopperid = xmlreader.GetValueAsString("netflixplugin", "shopperid", _defaultShopperID);
      }
    }

    protected virtual void SaveSettings()
    {
      using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings("MediaPortal.xml"))
      {
        xmlwriter.SetValue("netflixplugin", "shopperid", _shopperid);
      }
    }


HTH,
patrick
 

hobbes487

Portal Pro
August 25, 2005
208
3
Home Country
United States of America United States of America
thanks patrick! that helped a lot. I now have a beta version that i can release. The differences with my plugin and Gazpacho King's is that mine does not use a database at all and updates your queue in real time. Other than that, they are pretty similar.

current TODO list:

- allow user to specify with feeds are available to view in config - DONE!
- allow moving items in queue to specific spots, not just to the top
- implement searching for movies
- add many more browsing options
- be able to play trailers

Please feel free to send additional ideas my way!


download here: http://www.htpcsw.com/MP/NetflixManager.zip



Directions:


In the config, there are 2 IDs that need to be filled in.

Shopper ID: this can be found on the RSS feed page on the netflix site when you are logged in. It is the number after the "=" in the rss address.

Cookie ID: this can be found by looking at the cookie your browser uses to browse the netflix site. To find it using firefox goto tool->options->Privacy->Cookies tab then click view cookies. type in netflix to search for the cookie. find the one called NetflixShopperID. Use the value next to Content: for the cookie ID.

hope you like it!
 

Users who are viewing this thread

Top Bottom