diff options
author | ryuslash | 2010-04-19 09:16:59 +0200 |
---|---|---|
committer | ryuslash | 2010-04-19 09:16:59 +0200 |
commit | b5aac6235789c0561026edd38875c786480e4a61 (patch) | |
tree | 3d17d70dd9e67e9173a97267002bfdb364aacfd8 /download.py | |
parent | dfaa24b1b680cae0b24dad6761b0970eab0ba2c9 (diff) | |
parent | af529bcd4e214c13b7810eeba4d425c4a1129b58 (diff) | |
download | 4grab-b5aac6235789c0561026edd38875c786480e4a61.tar.gz 4grab-b5aac6235789c0561026edd38875c786480e4a61.zip |
Merge branch 'kirbybase' into develop
Diffstat (limited to 'download.py')
-rw-r--r-- | download.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/download.py b/download.py index 7508a50..42fcd52 100644 --- a/download.py +++ b/download.py @@ -22,6 +22,7 @@ import os import htmlparser import config import sys +import backend def get_savedir(): conf = config.Configuration() @@ -30,12 +31,10 @@ def get_savedir(): os.makedirs(savedir) return savedir def check_archive(fullpath): - conf = config.Configuration() - archive = conf.get_archive_location() filename = os.path.basename(fullpath) - archfile = os.path.join(archive, filename) - #sys.stderr.write("%s %d\n" % (archfile, os.path.exists(archfile))) - return os.path.exists(archfile) + be = backend.Backend() + return be.check(filename) + def write(message): sys.stdout.write(message) sys.stdout.flush() @@ -145,6 +144,10 @@ class Downloader(object): i += 1 progress.complete() + + be = backend.Backend() + be.save() + return (skipped, failed, downloaded, total) if __name__ == "__main__": |