diff options
Diffstat (limited to 'download.py')
-rw-r--r-- | download.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/download.py b/download.py index 42fcd52..eeec200 100644 --- a/download.py +++ b/download.py @@ -23,6 +23,7 @@ import htmlparser import config import sys import backend +import util def get_savedir(): conf = config.Configuration() @@ -125,6 +126,8 @@ class Downloader(object): progress.show_progress(i) filename = os.path.join(get_savedir(), os.path.split(link)[1]) if not check_archive(filename): + util.log(util.LogType.Msg, "%s is not in archive" % filename, None) + tries = 10 while tries > 0: try: @@ -135,10 +138,15 @@ class Downloader(object): if tries == 0: failed += 1 else: + util.log(util.LogType.Msg, "succsesfully downloaded %s" % filename, None) downloaded += 1 if self.on_downloaded is not None: + util.log(util.LogType.Msg, "", self.on_downloaded) + if not self.on_downloaded(filename): failed += 1 + else: + util.log(util.LogType.Warn, "on_downloaded is None", None) else: skipped += 1 i += 1 |