summaryrefslogtreecommitdiffstats
path: root/pyLoadCore.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-02-05 22:08:48 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-02-05 22:08:48 +0100
commitb4aa60892fb60efd57f593006f35f94868a646da (patch)
tree20e3dc3d8487269c5167e5cc73dabcd8261a4826 /pyLoadCore.py
parentfixed gui config error (diff)
downloadpyload-b4aa60892fb60efd57f593006f35f94868a646da.tar.xz
FlashGot + ClickNLoad Support + Webif. improvm.!! pyLoad FTW !!
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-xpyLoadCore.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py
index f85191ec4..30f025bbc 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -108,7 +108,7 @@ class Core(object):
self.do_kill = False
self.do_restart = False
translation = gettext.translation("pyLoad", join(self.path, "locale"), languages=[self.config['general']['language']])
- translation.install(unicode=False if sys.getdefaultencoding() == "ascii" else True)
+ translation.install(unicode=(False if sys.stdout.encoding == "ascii" else True))
self.check_install("Crypto", _("pycrypto to decode container files"))
self.check_install("Image", _("Python Image Libary (PIL) for captha reading"))
@@ -449,12 +449,15 @@ class ServerMethods():
self.core.file_list.collector.addLink(link)
self.core.file_list.save()
- def add_package(self, name, links):
+ def add_package(self, name, links, queue=True):
pid = self.new_package(name)
- self.core.file_list.packager.pushPackage2Queue(pid)
+
fids = map(self.core.file_list.collector.addLink, links)
map(lambda fid: self.move_file_2_package(fid, pid), fids)
- self.push_package_2_queue(pid)
+
+ if queue:
+ self.core.file_list.packager.pushPackage2Queue(pid)
+
self.core.file_list.save()
def new_package(self, name):