diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-02-04 16:17:22 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-02-04 16:17:22 +0100 |
commit | 52cf3751b2fe74aa5029f4b605b91aa84d9cf914 (patch) | |
tree | 30c636bb7ced6549e0aa4c9c46ae5aa8748f5a10 | |
parent | better DLC Support for Python 2.5 and 2.6 (diff) | |
download | pyload-52cf3751b2fe74aa5029f4b605b91aa84d9cf914.tar.xz |
little fixes, closed #71
-rw-r--r-- | locale/de/LC_MESSAGES/pyLoadCli.mo | bin | 375 -> 2431 bytes | |||
-rw-r--r-- | module/plugins/container/CCF.py | 1 | ||||
-rw-r--r-- | module/web/locale/de/LC_MESSAGES/django.po | 60 | ||||
-rw-r--r-- | module/web/locale/en/LC_MESSAGES/django.po | 60 | ||||
-rw-r--r-- | module/web/pyload/views.py | 7 | ||||
-rw-r--r-- | module/web/templates/default/base.html | 21 | ||||
-rw-r--r-- | module/web/templates/default/logs.html | 3 | ||||
-rw-r--r-- | module/web/templates/default/queue.html | 1 | ||||
-rw-r--r-- | module/web/templates/default/window.html | 2 | ||||
-rwxr-xr-x | pyLoadCli.py | 2 | ||||
-rwxr-xr-x | pyLoadCore.py | 17 |
11 files changed, 107 insertions, 67 deletions
diff --git a/locale/de/LC_MESSAGES/pyLoadCli.mo b/locale/de/LC_MESSAGES/pyLoadCli.mo Binary files differindex 1ae24953f..e137de19f 100644 --- a/locale/de/LC_MESSAGES/pyLoadCli.mo +++ b/locale/de/LC_MESSAGES/pyLoadCli.mo diff --git a/module/plugins/container/CCF.py b/module/plugins/container/CCF.py index 12728d022..14dd916da 100644 --- a/module/plugins/container/CCF.py +++ b/module/plugins/container/CCF.py @@ -1,7 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -import os.path import re import tempfile import urllib2 diff --git a/module/web/locale/de/LC_MESSAGES/django.po b/module/web/locale/de/LC_MESSAGES/django.po index 4a262d5ac..8a086dff1 100644 --- a/module/web/locale/de/LC_MESSAGES/django.po +++ b/module/web/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-02-03 15:16+0000\n" +"POT-Creation-Date: 2010-02-04 15:16+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -30,74 +30,78 @@ msgstr "" msgid "Download directory not found." msgstr "" -#: templates/default/base.html:21 templates/default/base.html.py:184 +#: templates/default/base.html:21 templates/default/base.html.py:185 msgid "Webinterface" msgstr "" -#: templates/default/base.html:126 +#: templates/default/base.html:31 +msgid "Please Enter a packagename." +msgstr "" + +#: templates/default/base.html:127 msgid "Logout" msgstr "" -#: templates/default/base.html:128 +#: templates/default/base.html:129 msgid "Administrate" msgstr "" -#: templates/default/base.html:134 +#: templates/default/base.html:135 msgid "Please Login!" msgstr "" -#: templates/default/base.html:146 templates/default/queue.html:78 +#: templates/default/base.html:147 templates/default/queue.html:79 msgid "Home" msgstr "" -#: templates/default/base.html:149 templates/default/queue.html:75 -#: templates/default/queue.html.py:79 +#: templates/default/base.html:150 templates/default/queue.html:75 +#: templates/default/queue.html.py:76 templates/default/queue.html:80 msgid "Queue" msgstr "" -#: templates/default/base.html:151 templates/default/downloads.html:20 -#: templates/default/queue.html:80 +#: templates/default/base.html:152 templates/default/downloads.html:20 +#: templates/default/queue.html:81 msgid "Downloads" msgstr "" -#: templates/default/base.html:153 templates/default/logs.html:4 -#: templates/default/queue.html:81 +#: templates/default/base.html:154 templates/default/logs.html:4 +#: templates/default/logs.html.py:5 templates/default/queue.html:82 msgid "Logs" msgstr "" -#: templates/default/base.html:165 +#: templates/default/base.html:166 msgid "Play" msgstr "" -#: templates/default/base.html:166 +#: templates/default/base.html:167 msgid "Cancel" msgstr "" -#: templates/default/base.html:167 +#: templates/default/base.html:168 msgid "Stop" msgstr "" -#: templates/default/base.html:168 +#: templates/default/base.html:169 msgid "Add" msgstr "" -#: templates/default/base.html:174 +#: templates/default/base.html:175 msgid "Speed:" msgstr "" -#: templates/default/base.html:175 +#: templates/default/base.html:176 msgid "Active:" msgstr "" -#: templates/default/base.html:176 +#: templates/default/base.html:177 msgid "Reload page" msgstr "" -#: templates/default/base.html:204 +#: templates/default/base.html:205 msgid "© 2008-2010 the pyLoad Team" msgstr "© 2008-2010 das pyLoad Team" -#: templates/default/base.html:206 +#: templates/default/base.html:207 msgid "Back to top" msgstr "" @@ -149,7 +153,19 @@ msgstr "" msgid "You were successfully logged out." msgstr "" -#: templates/default/queue.html:105 +#: templates/default/logs.html:26 +msgid "Start" +msgstr "" + +#: templates/default/logs.html:26 +msgid "prev" +msgstr "" + +#: templates/default/logs.html:26 +msgid "next" +msgstr "" + +#: templates/default/queue.html:106 msgid "Folder:" msgstr "" diff --git a/module/web/locale/en/LC_MESSAGES/django.po b/module/web/locale/en/LC_MESSAGES/django.po index 4f7f93de7..3676a800a 100644 --- a/module/web/locale/en/LC_MESSAGES/django.po +++ b/module/web/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-02-03 15:16+0000\n" +"POT-Creation-Date: 2010-02-04 15:16+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -30,74 +30,78 @@ msgstr "" msgid "Download directory not found." msgstr "" -#: templates/default/base.html:21 templates/default/base.html.py:184 +#: templates/default/base.html:21 templates/default/base.html.py:185 msgid "Webinterface" msgstr "" -#: templates/default/base.html:126 +#: templates/default/base.html:31 +msgid "Please Enter a packagename." +msgstr "" + +#: templates/default/base.html:127 msgid "Logout" msgstr "" -#: templates/default/base.html:128 +#: templates/default/base.html:129 msgid "Administrate" msgstr "" -#: templates/default/base.html:134 +#: templates/default/base.html:135 msgid "Please Login!" msgstr "" -#: templates/default/base.html:146 templates/default/queue.html:78 +#: templates/default/base.html:147 templates/default/queue.html:79 msgid "Home" msgstr "" -#: templates/default/base.html:149 templates/default/queue.html:75 -#: templates/default/queue.html.py:79 +#: templates/default/base.html:150 templates/default/queue.html:75 +#: templates/default/queue.html.py:76 templates/default/queue.html:80 msgid "Queue" msgstr "" -#: templates/default/base.html:151 templates/default/downloads.html:20 -#: templates/default/queue.html:80 +#: templates/default/base.html:152 templates/default/downloads.html:20 +#: templates/default/queue.html:81 msgid "Downloads" msgstr "" -#: templates/default/base.html:153 templates/default/logs.html:4 -#: templates/default/queue.html:81 +#: templates/default/base.html:154 templates/default/logs.html:4 +#: templates/default/logs.html.py:5 templates/default/queue.html:82 msgid "Logs" msgstr "" -#: templates/default/base.html:165 +#: templates/default/base.html:166 msgid "Play" msgstr "" -#: templates/default/base.html:166 +#: templates/default/base.html:167 msgid "Cancel" msgstr "" -#: templates/default/base.html:167 +#: templates/default/base.html:168 msgid "Stop" msgstr "" -#: templates/default/base.html:168 +#: templates/default/base.html:169 msgid "Add" msgstr "" -#: templates/default/base.html:174 +#: templates/default/base.html:175 msgid "Speed:" msgstr "" -#: templates/default/base.html:175 +#: templates/default/base.html:176 msgid "Active:" msgstr "" -#: templates/default/base.html:176 +#: templates/default/base.html:177 msgid "Reload page" msgstr "" -#: templates/default/base.html:204 +#: templates/default/base.html:205 msgid "© 2008-2010 the pyLoad Team" msgstr "" -#: templates/default/base.html:206 +#: templates/default/base.html:207 msgid "Back to top" msgstr "" @@ -149,7 +153,19 @@ msgstr "" msgid "You were successfully logged out." msgstr "" -#: templates/default/queue.html:105 +#: templates/default/logs.html:26 +msgid "Start" +msgstr "" + +#: templates/default/logs.html:26 +msgid "prev" +msgstr "" + +#: templates/default/logs.html:26 +msgid "next" +msgstr "" + +#: templates/default/queue.html:106 msgid "Folder:" msgstr "" diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py index 37470c98f..9d3b6dd29 100644 --- a/module/web/pyload/views.py +++ b/module/web/pyload/views.py @@ -148,7 +148,10 @@ def logs(request, page=0): log = file(join(settings.LOG_ROOT, "log.txt")).readlines() data = [] page = int(page) - for i in range(page, page + 20): - data.append({'line': i + 1, 'content':log[i]}) + try: + for i in range(page, page + 20): + data.append({'line': i + 1, 'content':log[i]}) + except: + pass return render_to_response(join(settings.TEMPLATE, 'logs.html'), RequestContext(request, {'log': data, 'next': str(page + 20), 'prev': 0 if page-20 < 0 else page-20}, [status_proc])) diff --git a/module/web/templates/default/base.html b/module/web/templates/default/base.html index 720453a30..bb44433ce 100644 --- a/module/web/templates/default/base.html +++ b/module/web/templates/default/base.html @@ -6,14 +6,14 @@ <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/default.css">
+<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/default.css"/>
<!--<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/jquery-ui-1.7.2.custom.css">-->
-<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/window.css">
+<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/window.css"/>
<!--<script src="{{ MEDIA_URL }}js/jquery-1.3.2.min.js"></script>-->
-<script src="{{ MEDIA_URL }}js/sprintf.js"></script>
-<script src="{{ MEDIA_URL }}js/funktions.js"></script>
-<script src="{{ MEDIA_URL }}js/mootools-1.2.4-core.js"></script>
-<script src="{{ MEDIA_URL }}js/mootools-1.2.4.2-more.js"></script>
+<script type="text/javascript" src="{{ MEDIA_URL }}js/sprintf.js"></script>
+<script type="text/javascript" src="{{ MEDIA_URL }}js/funktions.js"></script>
+<script type="text/javascript" src="{{ MEDIA_URL }}js/mootools-1.2.4-core.js"></script>
+<script type="text/javascript" src="{{ MEDIA_URL }}js/mootools-1.2.4.2-more.js"></script>
<!--<script src="{{ MEDIA_URL }}js/jquery.progressbar.js"></script>-->
<!--<script src="{{ MEDIA_URL }}js/jquery.form.js"></script>-->
@@ -28,6 +28,7 @@ document.addEvent("domready", function(){ add_box = new Fx.Tween($('add_box'));
$('add_form').onsubmit=function() {
+ if ($('add_name').value == "") alert("{% trans "Please Enter a packagename." %}")
$('add_form').target = 'upload_target'; //'upload_target' is the name of the iframe
out();
}
@@ -113,7 +114,7 @@ function AddBox() {% block head %}
{% endblock %}
</head>
-
+ <body>
<a class="anchor" name="top" id="top"></a>
<div id="head-panel">
@@ -187,7 +188,7 @@ function AddBox() {% endblock %}
-<br>
+<br/>
<div class="level1" style="clear:both">
</div>
@@ -209,6 +210,8 @@ function AddBox() </div>
</div>
+</div>
{% include "default/window.html" %}
-<body>
+</body>
+</html>
diff --git a/module/web/templates/default/logs.html b/module/web/templates/default/logs.html index c35c68706..8dbe5a382 100644 --- a/module/web/templates/default/logs.html +++ b/module/web/templates/default/logs.html @@ -2,6 +2,7 @@ {% load i18n %} {% block title %}{% trans "Logs" %} - {{block.super}} {% endblock %} +{% block subtitle %}{% trans "Logs" %}{% endblock %} {% block menu %} <li> @@ -22,5 +23,5 @@ <li>{{line.line}}: {{line.content}}</li> {% endfor %} </ul> -<a href="{% url logs %}"><< Start</a> <a href="{% url logs prev %}">< prev</a> <a href="{% url logs next %}">next ></a> +<a href="{% url logs %}"><< {% trans "Start" %}</a> <a href="{% url logs prev %}">< {% trans "prev" %}</a> <a href="{% url logs next %}">{% trans "next" %} ></a> {% endblock %}
\ No newline at end of file diff --git a/module/web/templates/default/queue.html b/module/web/templates/default/queue.html index a136e1213..4cc01eeef 100644 --- a/module/web/templates/default/queue.html +++ b/module/web/templates/default/queue.html @@ -73,6 +73,7 @@ document.addEvent("domready", function(){ {% endblock %}
{% block title %}{% trans "Queue" %} - {{block.super}} {% endblock %}
+{% block subtitle %}{% trans "Queue" %}{% endblock %}
{% block menu %}
<li> <a href="{% url home %}" title=""><img src="{{ MEDIA_URL }}img/head-menu-home.png" alt="" /> {% trans "Home" %}</a> </li>
diff --git a/module/web/templates/default/window.html b/module/web/templates/default/window.html index 11ac8056c..18de3b0e2 100644 --- a/module/web/templates/default/window.html +++ b/module/web/templates/default/window.html @@ -11,7 +11,7 @@ <label>{% trans "Name" %}
<span class="small">{% trans "The name of the new package." %}</span>
</label>
-<input name="add_name" type="text" size="20" />
+<input id="add_name" name="add_name" type="text" size="20" />
<label>{% trans "Links" %}
<span class="small">{% trans "Paste your links here" %}</span>
diff --git a/pyLoadCli.py b/pyLoadCli.py index be84e0349..9b65bf2b3 100755 --- a/pyLoadCli.py +++ b/pyLoadCli.py @@ -431,7 +431,7 @@ if __name__ == "__main__": config = xmlconfig.getConfig() translation = gettext.translation("pyLoadCli", join(abspath(dirname(__file__)), "locale"), languages=[config['general']['language']]) - translation.install(unicode=True) + translation.install(unicode=False if sys.getdefaultencoding() == "ascii" else True) if len(sys.argv) > 1: diff --git a/pyLoadCore.py b/pyLoadCore.py index 39ea4727f..94abd2d08 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -45,6 +45,7 @@ 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 +54,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 """
@@ -139,7 +140,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)
@@ -340,7 +341,7 @@ class Core(object): def check_update(self):
try:
if self.config['updates']['search_updates']:
- version_check = Request().load("http://get.pyload.org/check/%s/" % (CURRENT_VERSION, ))
+ version_check = Request().load("http://get.pyload.org/check/%s/" % (CURRENT_VERSION,))
if version_check == "":
self.logger.info(_("No Updates for pyLoad"))
return False
@@ -355,9 +356,9 @@ class Core(object): def install_update(self):
if self.config['updates']['search_updates']:
if self.core.config['updates']['install_updates']:
- version_check = Request().load("http://get.pyload.org/get/update/%s/" % (CURRENT_VERSION, ))
+ version_check = Request().load("http://get.pyload.org/get/update/%s/" % (CURRENT_VERSION,))
else:
- version_check = Request().load("http://get.pyload.org/check/%s/" % (CURRENT_VERSION, ))
+ version_check = Request().load("http://get.pyload.org/check/%s/" % (CURRENT_VERSION,))
if version_check == "":
return False
else:
@@ -577,9 +578,9 @@ class ServerMethods(): return True
else:
return False
- - def get_events(self, uuid): - return self.core.pullManager.getEvents(uuid) +
+ def get_events(self, uuid):
+ return self.core.pullManager.getEvents(uuid)
#def move_urls_up(self, ids):
# for id in ids:
|