Script Summary: v2.8: This script adds to your Netflix queue pages a fully configurable multi-column sorter. It allows you to shuffle (randomize), reverse, and sort your DVD or Instant Queue by star rating (suggested rating or user rating), average rating, title, length, year, genre, format, availability, playability, language, etc.
Version: 2.8
Screen shot:
Installation instructions:
- Safari (fast and fully functional):
- Install the NinjaKit extension.
- Restart Safari.
- Install this script via the link above.
- Manage your scripts via the NinjaKit toolbar icon or via the Extensions preferences.
- Firefox (fully functional):
- Install the Greasemonkey add-on.
- Restart Firefox.
- Install this script via the link above.
- Manage your scripts via the Tools-->Greasemonkey-->Manage User Scripts... menu.
- Chrome (fastest and fully functional except "script update available" indication):
- (No add-on or extension installation required.)
- Install this script via the link above.
- Manage your scripts via the Window-->Extensions menu.
Available options:
| Shuffle | Shuffles your queue into a random order. |
| Reverse | Reverses the current list order. (Turns 1 through 100 into 100 through 1.) |
| Sort by Title | Alphabetically sorts your queue by movie title. |
| Sort by Playability | Moves all playable movies to the top (↑) or bottom (↓) of your queue. Does not change the order of all other movies in your queue. (DVD queue only.) |
| Sort by Star Rating | Sorts all movies by star rating (the colored stars you see in your queue) from high to low (primary sort) and then by title (secondary sort). Use the Reverse button to sort from low to high rating. |
| Sort by Average Rating | Sorts all movies by average rating from high to low. Use the Reverse button to sort from low to high rating. |
| Sort by Genre | Alphabetically sorts your queue by genre (primary sort) and then by title (secondary sort). |
| Sort by TV/Movies | Moves the Television genre above all movie genres (primary sort) and then sorts by title (secondary sort). |
| Sort by Availability | Moves the most desirable movies to the top of your queue. (Makes sure you're one of the first to receive new or hard to get movies.) Does not change the order of all other movies in your queue. The sort order for the DVD queue is: future releases, very long wait, long wait, short wait, unavailable, now. The sort order for the instant queue is: limited availability on top, the rest below. |
| Sort by Length | Sorts your queue by length from short to long. For series discs, the length of just the first episode is shown (because you might only have time to watch one episode). |
| Sort by Year | Sorts your queue by year from high to low. |
| Sort by Format | Moves hi-definition movies above standard-definition movies. The sort order for the DVD queue is: Blu-ray above DVD. The sort order for the instant queue is: HD above streaming. (Note: due to recent Netflix changes, formats cannot be retrieved for some series discs.) |
| Sort by Language | Alphabetically sorts your queue by language. |
| Sort by Date Added | Sorts your queue by the date you added movies to the queue (most recently added on top). (Note: due to recent Netflix changes, this data is no longer available, so this sort is hidden for now.) |
What's New in Version 2.x
- All functionality of version 1.x is still there. The only thing I removed was the option to customize articles (a, an, the, etc) for title sort. If you ever find you need a new article added, just let me know.
- Updated description of the various sorts available on the home page.
- Updated installation instructions available on the home page. Firefox was already fully supported, and now Safari too via the NinjaKit extension. Chrome is almost fully supported; everything works except the script checking if there's an update available. Opera is not supported as it's missing some core Greasemonkey functionality--I'm looking for workarounds. I'm still looking for a good GM equivalent for IE as well.
- Improved UI (IMHO).
- New sorts: year, format, language, date added to queue, and ability to move the TV genre above all movie genres.
- Indication of sorts that could be slow (notice the asterisk (*) in a button's name).
- Caching. Data retrieved from Netflix movie pages is stored so it won't have to be retrieved again.
- Display of cached data. All sortable data retrieved from Netflix movie pages is displayed as a tooltip behind an "info" icon. (Previously the script did something like that for the length of a movie; now it's generalized for all data points not already visible in the queue itself.)
- Indication that a script update is available.
- Undo support. The sort now automatically will take effect (no more pressing the Update button after a sort). Use the undo function to go back to the previous sort.
- Compatible with the Netflix Rating Granulizer script and with the Netflix Boximages script, although I think the latter is broken.
- Fully object-oriented implementation (previous was strictly functional). This should make it easier for me to fix bugs and to add additional data points to sort on, even from external sites, so keep those suggestions coming. (To use external sites, all I would need is a reliable way to match Netflix movies to the external site listings, which is not always easy. Given the Netflix movie title, what external page has additional data points for that movie?) Mostly JSLint.com compliant. Also, 3x more code!
History:
- 2011-07-06: v2.8: Fix TV/Movies sort, use meta page for version check, hide configuration icon as that UI is not ready yet
- 2010-03-23: v2.7: Fix starred sorts, as Netflix changed markup of some details pages
- 2010-03-17: v2.6: Add rudimentary support for FF4, remove "Date Added" sort button as its datapoint was removed by Netflix
- 2010-03-14: v2.5: Use movies.netflix.com in stead of www.netflix.com for retrieving movie details
- 2010-03-14: v2.4: Fix bug in "date added" retrieval (looks like Netflix removed that field); hide Config icon as the UI is not ready yet
- 2010-01-31: v2.3: Netflix removed "last date added" from movies.netflix.com's movie details page; use www.netflix.com's instead as it seems to no longer redirect to movies.netflix.com
- 2011-01-12: v2.2: allow script to be run on netflix.ca, remember min/max row values if they were used, address some TODO items in the code, start on config UI (not exposed yet), remove alert to run on www as Netflix now redirects www to movies; until I or Netflix figures out a fix, ask the user to reload the page if the sort order didn't change...
- 2010-12-31: v2.1: add sort by added date and custom genre sort by TV/Movies
- 2010-12-30: v2.0: complete rewrite of the script, fixes all issues reported lately, firefox, safari and chrome support, additional sorts, improved UI (configurable sort buttons coming soon)
- 2010-12-22: v1.15: fix broken sorts, all should be ok again
- 2010-12-21: v1.14: fix script after Netflix site changes, some sorts remain broken
- 2010-02-18: v1.13: fix title sort to support Google Chrome
- 2009-08-26: v1.12: fix rating sort due to Netflix site changes
- 2009-06-05: v1.11: fix availability sort due to Netflix site changes, add ability to cancel lengthy operations (i.e. sort by length)
- 2009-04-15: v1.10: add ability to move playable movies to bottom of DVD Queue, provide tooltips for sort buttons, add "les" article, make script work with FF2
- 2009-03-16: v1.9: change default title sort behavior so that articles (a, an, the, etc) at the start of movie titles are ignored, as this is the Netflix default
- 2009-03-16: v1.8: add customization option to title sort so that articles (a, an, the, etc) at the start of movie titles can be ignored (see below), fix two small bugs
- 2009-02-26: v1.7: add sort by length, display length in queue, get closer to JSLint compliance
- 2009-01-31: v1.6: fix compatibility with the Netflix Rating Granulizer script, add progress indicator for avg rating sort, incorporate some JSLint feedback
- 2008-11-29: v1.5: fix sorting dates in availability sort on Instant queue
- 2008-11-08: v1.4: series discs are now in correct order when sorting by rating
- 2008-11-06: v1.3: small fix to availability sort: just move items up and don't change rest of the list order
- 2008-11-06: v1.2: add sort by availability, add sort by playability, add reverse queue option, rename randomize -> shuffle
- 2008-11-01: v1.1: fix netflix changed page markup, add randomize, sort by title and sort by genre, don't use rated movies in avg rating sort, fix bug in series disc processing, improve ui, improve performance by not marking changed rows
- 2008-10-17: v1.0: rename user rating to suggested rating, make sorting DVD queue work (deal with series discs), let user know what to do when sort is done.
- 2008-10-11: v0.2: allow sort by user rating and average rating, improve performance, enable Update Queue button, mark changed rows, scroll back to top when sort is done.
- 2008-10-08: v0.1: sorting algorithm works for Instant queue only.
Known Issues (also see my to-do list):
- Please make sure you've uninstalled any and all old version(s) of this script via Tools-->Greasemonkey-->Manage User Scripts...
Select Netflix Queue Sorter and press the Uninstall button.
Then, if you haven't already, install the latest version of this script. - Chrome: Chrome does not support cross-domain XHRs, so the script is unable to determine if an update is available (it needs to contact userscripts.org for that).
- Opera: Opera does not support Greasemonkey XHRs, so this script is unusable on Opera. A future release may fix this by adding custom support for XHRs.
- All sort options marked with an asterisk (*) are slow as they have to go out to every movie page to get the data they need. However, the script caches this data so it'll be faster the next time you use it.
- For some series discs, Netflix reports "the" movie length as total running time of all individual discs rather than the length of each disc.
Acknowledgments:
- The icons used in this UI are available from http://www.customicondesign.com (specifically, here and here). Their "readme" file is available at http://www.iconspedia.com/dload.php?up_id=59969
- To reduce their size, Photoshop was used (Save for Web as PNG-24, no interlacing, no metadata)
- To reduce their size even further, Smush.it was used: http://www.smushit.com/ysmush.it/
- Then the icons were converted to base64 encoding for embedding within JavaScript using: http://www.greywyvern.com/code/php/binary2base64
- For supplant and trim functions, this implementation was used: http://javascript.crockford.com/remedial.html
- To work around Chrome's lack of GM_getValue and GM_setValue, this implementation was used: http://devign.me/greasemonkey-gm_getvaluegm_set...
- For development purposes, this implementation of a cross-browser XHR object was used: http://www.quirksmode.org/js/xmlhttp.html
- To clean up my JavaScript code, JSLint was used: http://www.jslint.com/ ("The Good Parts" options)




