summaryrefslogtreecommitdiffstats
path: root/pyLoadCore.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-02-04 19:38:10 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-02-04 19:38:10 +0100
commit79d32ba04cf44b00e2e873d272127bb62dd57147 (patch)
tree95ddd513fa0eb24a4dee1ef420b1ef198bb943e2 /pyLoadCore.py
parentreadded new dlc stuff (diff)
downloadpyload-79d32ba04cf44b00e2e873d272127bb62dd57147.tar.xz
some l18n fixes
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-xpyLoadCore.py36
1 files changed, 19 insertions, 17 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py
index 453e2d56e..f85191ec4 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -40,11 +40,13 @@ from os.path import exists
from os.path import join
from re import sub
import subprocess
+import sys
from sys import argv
from sys import executable
from sys import exit
from sys import path
from sys import stdout
+from sys import version_info
from tempfile import NamedTemporaryFile
import thread
import time
@@ -53,13 +55,13 @@ from xmlrpclib import Binary
from module.CaptchaManager import CaptchaManager
from module.HookManager import HookManager
+from module.PullEvents import PullManager
from module.XMLConfigParser import XMLConfigParser
from module.file_list import File_List
from module.network.Request import Request
import module.remote.SecureXMLRPCServer as Server
from module.thread_list import Thread_List
from module.web.ServerThread import WebServer
-from module.PullEvents import PullManager
class Core(object):
""" pyLoad Core """
@@ -106,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=True)
+ translation.install(unicode=False if sys.getdefaultencoding() == "ascii" else True)
self.check_install("Crypto", _("pycrypto to decode container files"))
self.check_install("Image", _("Python Image Libary (PIL) for captha reading"))
@@ -139,7 +141,7 @@ class Core(object):
self.lastGuiConnected = 0
self.server_methods = ServerMethods(self)
- self.file_list = File_List(self)
+ self.file_list = File_List(self)
self.pullManager = PullManager(self)
self.thread_list = Thread_List(self)
self.captchaManager = CaptchaManager(self)
@@ -577,20 +579,20 @@ class ServerMethods():
return True
else:
return False
-
- def get_events(self, uuid):
- return self.core.pullManager.getEvents(uuid)
-
- def get_full_queue(self):
- data = []
- for pack in self.core.file_list.data["queue"]:
- p = {"data":pack.data, "children":[]}
- for child in pack.files:
- info = self.core.file_list.getFileInfo(child.id)
- info["downloading"] = None
- p["children"].append(info)
- data.append(p)
- return data
+
+ def get_events(self, uuid):
+ return self.core.pullManager.getEvents(uuid)
+
+ def get_full_queue(self):
+ data = []
+ for pack in self.core.file_list.data["queue"]:
+ p = {"data":pack.data, "children":[]}
+ for child in pack.files:
+ info = self.core.file_list.getFileInfo(child.id)
+ info["downloading"] = None
+ p["children"].append(info)
+ data.append(p)
+ return data
#def move_urls_up(self, ids):
# for id in ids: