diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-02-05 22:08:48 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-02-05 22:08:48 +0100 |
commit | b4aa60892fb60efd57f593006f35f94868a646da (patch) | |
tree | 20e3dc3d8487269c5167e5cc73dabcd8261a4826 /pyLoadCore.py | |
parent | fixed gui config error (diff) | |
download | pyload-b4aa60892fb60efd57f593006f35f94868a646da.tar.xz |
FlashGot + ClickNLoad Support + Webif. improvm.!! pyLoad FTW !!
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-x | pyLoadCore.py | 11 |
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):
|