m5n / netflix-queue-sorter

Greasemonkey script for Chrome, Firefox, Opera, Safari: shuffle, reverse, and sort your DVD Queue or Instant Queue by star rating, average rating, title, length, year, genre, format, availability, playability, language, etc.
MIT License
28 stars 3 forks source link

Broken - Average Rating, Star/Average Rating, Length, Year, Format, Langauge, Date Added #2

Open chris78664 opened 10 years ago

chris78664 commented 10 years ago

First I love your script it is a very useful. Unlucky these buttons are broken Average Rating, Star/Average Rating, Length, Year, Format, Language, Date Added. I have re-downloaded the latest Grease Monkey script (2.101) all these choices [buttons] are broken (stuck retrieving data) again since Netflix updated their pages again. I would have posted this on userscripts.org but it has been down for a while now. Any help would be appreciated.

m5n commented 10 years ago

I only have the Instant plan and it works for me there: http://www.netflix.com/MyList Unfortunately I cannot test the page for the DVD plan. What is the URL you're running the script on and which browser are you using?

Could you enable debug mode and capture the output? Here are the steps:

Let me know if you run into trouble.

m5n commented 10 years ago

I uploaded v2.102 (on GitHub as Userscripts.org is down), that may likely also fix this issue. Please let me know if it does not.

m5n commented 10 years ago

Most likely same as issue #1. Please reopen if there's still a problem.

jaredsohn commented 9 years ago

I am experiencing a similar problem. I am using the latest script with Tampermonkey on Chrome and find that the following buttons don't work (a slightly different set than in the issue title): length, year, language, format, average rating, star/avg rating, even when all rows are selected.

Here is some debug information after pressing the 'year' button for all rows:

init: initConfigOptions VM4994:244 init: assertUniqueDataPoints VM4994:244 init: hideQueueReorderingTip VM4994:244 init: createSortIndependentLookups VM4994:244 init: showUi VM4994:244 showUi: update button: Update List VM4994:244 showUi: CSS added VM4994:244 showUi: HTML added VM4994:244 init: checkForUndo VM4994:244 init: showCachedData VM4994:244 init: checkForUpdates VM4994:244 init complete VM4994:244 prepSort: [{"command":"sort","fields":["year","title"],"sortFns":["defaultSortFn","defaultSortFn"],"dirs":[-1,1]}] VM4994:244 Fetch queue data retrievers need. VM4994:244 Retrieved 5 elts VM4994:244 netflix-queue: retrieved data: [{"order":1,"movieId":70143836,"seriesId":70143836,"title":"BREAKING BAD","playability":"NOW","starRating":5,"genre":"TV Shows"},{"order":2,"movieId":70242311,"seriesId":70242311,"title":"ORANGE IS THE NEW BLACK","playability":"NOW","starRating":5,"genre":"TV Shows"},{"order":3,"movieId":70118799,"title":"IP MAN","playability":"NOW","starRating":4.6,"genre":"Foreign Movies"},{"order":4,"movieId":70167133,"title":"OUR IDIOT BROTHER","playability":"NOW","starRating":4.6,"genre":"Independent Movies"},{"order":5,"movieId":70269568,"title":"SMURFS 2, THE","playability":"NOW","starRating":2.5,"genre":"Comedies"}] VM4994:244 netflix-queue: backup fields: {} VM4994:244 netflix-queue: series lookup: {} VM4994:244 netflix-queue: backup data to retrieve: {} VM4994:244 netflix-queue: extra retrievers to call: [] VM4994:244 data for retrievers: [{"order":1,"movieId":70143836,"seriesId":70143836,"title":"BREAKING BAD","playability":"NOW","starRating":5,"genre":"TV Shows"},{"order":2,"movieId":70242311,"seriesId":70242311,"title":"ORANGE IS THE NEW BLACK","playability":"NOW","starRating":5,"genre":"TV Shows"},{"order":3,"movieId":70118799,"title":"IP MAN","playability":"NOW","starRating":4.6,"genre":"Foreign Movies"},{"order":4,"movieId":70167133,"title":"OUR IDIOT BROTHER","playability":"NOW","starRating":4.6,"genre":"Independent Movies"},{"order":5,"movieId":70269568,"title":"SMURFS 2, THE","playability":"NOW","starRating":2.5,"genre":"Comedies"}] VM4994:244 Fetch retriever data. VM4994:244 Retrieve fields: ["year","title"] from: netflix-details-page VM4994:244 Retrieving: http://www.netflix.com/movie/70143836?fdvd=true VM4994:714 Uncaught TypeError: Cannot read property 'innerHTML' of undefinedNetflixDetailsPageRetriever.extractRating @ VM4994:714NetflixDetailsPageRetriever.extractAvgRating @ VM4994:730parsePage @ VM4994:1083req.onreadystatechange @ VM4994:158

m5n commented 9 years ago

Hi Jared,

Fetch retriever data. VM4994:244 Retrieve fields: ["year","title"] from: netflix-details-page VM4994:244 Retrieving: http://www.netflix.com/movie/70143836?fdvd=true

Can you load the details page mentioned above and send me the HTML source of that page at [email deleted]? Something must have changed in the HTML, so I'll need to update the script.

Do you have DVD plan only, Instant only or both?

jaredsohn commented 9 years ago

Hi, I only have the Instant plan. I have sent the HTML source of that page to your e-mail.

Netflix made a large UI change that went out to everyone as of a couple of weeks ago (some people experienced it earlier via UI experiments).

jaredsohn commented 9 years ago

Thanks so much for building this script.

We're using this script as a part of the Flix Plus by Lifehacker extension and I just made some fixes that may interest you. You can find them here, should you want to incorporate something similar into the userscript (if nothing else, to better understand the scope of the required changes): https://github.com/jaredsohn/flix_plus/commit/d5c88ea87b9216ab38e236e441913ee7b1dc4085

Note that we're only using this script for streaming and the changes were made to a fork of an older version of the script.

Basically, I removed support for the language, average rating, and star/average rating fields since the parsing for these fields broke and this information is not shown within movie pages. Also, I updated the length parser to work with '###h ###m' type strings; I'm now treating anything without this information (mostly TV shows) as zero length since episode information requires some JavaScript to get run before it is shown. Finally, I removed a few fields (such as format) that seemed like they would only be useful when the queue includes DVDs (it seemed strange to me that the field was even being shown.) The above changes also allowed some of the other sort types (such as 'year') to work since it wouldn't run into the same errors.