daviddeutsch / yt-sanegrid

YouTube abandoned the subscription grid view. This has made a lot of people very angry and been widely regarded as a bad move.
http://daviddeutsch.github.io/yt-sanegrid/
GNU General Public License v3.0
37 stars 10 forks source link

Some changes so to promises #150

Closed kalaspuffar closed 9 years ago

kalaspuffar commented 9 years ago

Hi again David.

Had some time to sit and code on yt-sane again and tried to get it to a working copy where you could load videos and reload so you get the latest in the list.

Found another place where youtube changed the API from doc to value on the channel response and that made it not load. Later I looked into all the promises handling and found some places where you saved the promises object in an array instead of the promise which in turn didn't trigger the $q.all method later.

Also moved a $q.all trigger so it was insured to have promises to wait for.

Lastly I found that you couldn't ask the API for 200 videos in one go so I chunked up the question to ask for 10 videos each time. Might be few but I just wanted to get it to work. It's really late here so I have to stop for tonight. If you want me to tidy up the code before you take this pull I understand.

Just wanted to add some code and inform you on my progress. Hope this will be helpful.

Ohh almost forgot. I merged your changes from gh-pages into the master branch as well. Hope you don't mind.

Best regards Daniel

kalaspuffar commented 9 years ago

Realized I have an obvious bug in the chunks and scope of an block for the deferrer. Will fix that today and send a new pull request.