learningequality/ka-lite — pull request #1650 by bcipolli (2014-03-01 16:14:13+00:00)
Title: Don't retry non-connectivity errors... and implementing iterative download updates for youtube-dl

First: thanks to @aronasorman , whose download and use of the python version of youtube-dl enabled everything done here. You da man!

To solve #1455, I:
* Found the errors from our `urllib` and `youtube-dl` libraries that map to connectivity errors (at least, the errors thrown when I turn off my wifi connection).
* When an error is thrown during download, only set up the (existing) retry loop if the error caught matches the above.

Along the way, I saw that `youtube-dl` does have a callback system in place for getting iterative updates. So I hooked that up and backed out the changes made in #1576:

![image](https://f.cloud.github.com/assets/4072455/2301812/3cf60fc6-a15c-11e3-8f62-a4c25095700e.png)

Testing:
* Tested `videodownload` with wifi off, with a code tweak to force `youtube-dl` to hit that codepath
* Tested video downloading through the UI when language = Polish
* NOTE: downloading videos through French or Portuguese actually work through amazon (another unexpectedly great difference), so to hit the `youtube-dl` codepath, you'll need some language that KA is not yet supporting (like Polish)