netflix hacking
July 24th, 2005 by herichon
So today I took the time I should have spent watching two Netflix DVDs that have been sitting here for a week and instead added a plugin to show my recent Netflix movies and a handful of the ones at the top of my queue. You’ll see the DVD boxes on the sidebar, toward the bottom. Clicking on any of them brings you to the Netflix page for that movie.
If you’re a casual reader, you might want to stop here – geekiness ahoy…
This time I actually did some of my own coding, believe it or not. I started out with Jimmy Oliver’s Netflix plugin, which does work quite well. It seems to be designed to only show either your queue or your recent activity, and I wanted both, so I rewrote the function to support a new selection parameter. Then I decided I wanted to see box covers instead of movie titles, so after some messing around in the code (and puzzling over the MT plugin by Oscar) I worked out how to get some nice images courtesy of Netflix. A little more PHP tweaking got them to stack up nicely in the sidebar. Finally I noticed that the links Netflix sends out in its RSS feeds all include a tracking number at the end (something like “&trkid=128243”), and that made me a little nervous, so I added another parameter to allow tracking numbers to be stripped out of the URLs on request.
Whew. That was fun—I had forgotten how satisfying it is to write a piece of code that should work, fire it up, and see it do exactly what you want it to do. And PHP is turning out to be much easier to work with than I remember. I may have to see about writing some more Wordpress plugins.
I don’t have a download page or anything yet, but if you’d like a copy of the plugin code to mess around with, let me know.