From a58cfc276be9736578d7ce8f1dd63a621f94c637 Mon Sep 17 00:00:00 2001 From: mkaay Date: Mon, 9 Nov 2009 21:06:39 +0100 Subject: checksum methods for RapidshareCom and UploadedTo --- module/download_thread.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'module/download_thread.py') diff --git a/module/download_thread.py b/module/download_thread.py index 98e4915c5..9c7fe1a42 100644 --- a/module/download_thread.py +++ b/module/download_thread.py @@ -107,9 +107,23 @@ class Download_Thread(threading.Thread): status.url = pyfile.plugin.get_file_url() status.type = "downloading" + + local_file = pyfile.download_folder + "/" + status.filename + pyfile.plugin.proceed(status.url, local_file) - pyfile.plugin.proceed(status.url, pyfile.download_folder + "/" + status.filename) - + status.type = "checking" + + check, code = pyfile.plugin.check_file(local_file) + """ + return codes: + 0 - checksum ok + 1 - checksum wrong + 5 - can't get checksum + 10 - not implemented + 20 - unknown error + """ + #print "checksum check returned: %s, %s" % (check, code) + status.type = "finished" #startet downloader -- cgit v1.2.3