summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-01-19 22:05:18 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-01-19 22:05:18 +0100
commit4affc4b5f1a11e19c9df1a2e26957622730b9539 (patch)
treef90487b477bc54dd9f36b9d90e32ebb54d592053 /module/plugins
parentfixed cleanup (diff)
downloadpyload-4affc4b5f1a11e19c9df1a2e26957622730b9539.tar.xz
fixes for chunked download
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/Plugin.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index 880b9e211..e237d52c8 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -22,8 +22,6 @@ from time import sleep
from random import randint
-import sys
-
import os
from os import remove
from os import makedirs
@@ -38,11 +36,9 @@ if os.name != "nt":
from pwd import getpwnam
from grp import getgrnam
-from mimetypes import guess_type
-
from itertools import islice
-from module.Utils import save_join
+from module.utils import save_join
def chunks(iterable, size):
it = iter(iterable)
@@ -250,9 +246,8 @@ class Plugin(object):
result = ocr.get_captcha(temp.name)
else:
captchaManager = self.core.captchaManager
- mime = guess_type(temp.name)
task = captchaManager.newTask(self)
- task.setCaptcha(content, mime[0])
+ task.setCaptcha(content, None) #@TODO mimetype really needed?
task.setWaiting()
while not task.getStatus() == "done":
if not self.core.isClientConnected():
@@ -318,7 +313,7 @@ class Plugin(object):
download_folder = self.config['general']['download_folder']
- location = save_join(download_folder, self.pyfile.package().folder) # remove : for win compability
+ location = save_join(download_folder, self.pyfile.package().folder)
if not exists(location):
makedirs(location, int(self.core.config["permission"]["folder"],8))