aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/FileDownloader.py
diff options
context:
space:
mode:
authorFilippo Valsorda <filippo.valsorda@gmail.com>2012-03-30 23:45:27 +0200
committerFilippo Valsorda <filippo.valsorda@gmail.com>2012-03-30 23:45:27 +0200
commit58ca755f4062146fbb9ce9d4383f033b8a631ed0 (patch)
tree8b86b7e7369730cb24eaae8f49fcf357d2603c9d /youtube_dl/FileDownloader.py
parent770234afa28d39f8ca512a3908d589b67af71020 (diff)
downloadyoutube-dl-58ca755f4062146fbb9ce9d4383f033b8a631ed0.tar.xz
moved increment_downloads and process_info calls from IEs to FD.download (#296) (follows current doclines); a small step towards importability #217
Diffstat (limited to 'youtube_dl/FileDownloader.py')
-rw-r--r--youtube_dl/FileDownloader.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.py
index b234f1857..63b29a837 100644
--- a/youtube_dl/FileDownloader.py
+++ b/youtube_dl/FileDownloader.py
@@ -470,7 +470,13 @@ class FileDownloader(object):
suitable_found = True
# Extract information from URL and process it
- ie.extract(url)
+ videos = ie.extract(url)
+ for video in videos or []:
+ try:
+ self.increment_downloads()
+ self.process_info(video)
+ except UnavailableVideoError:
+ self.trouble(u'\nERROR: unable to download video')
# Suitable InfoExtractor had been found; go to next URL
break