summaryrefslogtreecommitdiffstats
path: root/module/web/pyload
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 /module/web/pyload
parentfixed gui config error (diff)
downloadpyload-b4aa60892fb60efd57f593006f35f94868a646da.tar.xz
FlashGot + ClickNLoad Support + Webif. improvm.!! pyLoad FTW !!
Diffstat (limited to 'module/web/pyload')
-rw-r--r--module/web/pyload/urls.py2
-rw-r--r--module/web/pyload/views.py21
2 files changed, 20 insertions, 3 deletions
diff --git a/module/web/pyload/urls.py b/module/web/pyload/urls.py
index 73ba08c21..34c3aee18 100644
--- a/module/web/pyload/urls.py
+++ b/module/web/pyload/urls.py
@@ -11,6 +11,8 @@ urlpatterns = patterns('pyload',
(r'^downloads/$', 'views.downloads',{},'downloads'),
(r'^download/(?P<path>[a-zA-z\.0-9\-/_%]+)$', 'views.download',{},'download'),
(r'^queue/$', 'views.queue',{}, 'queue'),
+ (r'^collector/$', 'views.collector',{}, 'collector'),
+ (r'^settings/$', 'views.config',{}, 'config'),
(r'^logs/$', 'views.logs',{}, 'logs'),
(r'^logs/(?P<page>\d+)$', 'views.logs',{}, 'logs'),
(r'^$', 'views.home',{}, 'home'),
diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py
index 9d3b6dd29..2891b373d 100644
--- a/module/web/pyload/views.py
+++ b/module/web/pyload/views.py
@@ -74,9 +74,7 @@ def home(request):
@permission('pyload.can_see_dl')
@check_server
def queue(request):
- queue = settings.PYLOAD.get_queue()
- for pack in queue:
- pack["children"] = map(settings.PYLOAD.get_file_info, settings.PYLOAD.get_package_files(pack["id"]))
+ queue = settings.PYLOAD.get_full_queue()
return render_to_response(join(settings.TEMPLATE, 'queue.html'), RequestContext(request, {'content': queue}, [status_proc]))
@@ -146,6 +144,7 @@ def download(request, path):
def logs(request, page=0):
log = file(join(settings.LOG_ROOT, "log.txt")).readlines()
+ log.reverse()
data = []
page = int(page)
try:
@@ -155,3 +154,19 @@ def logs(request, page=0):
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]))
+
+@login_required
+@permission('pyload.can_add_dl')
+@check_server
+def collector(request):
+ coll = settings.PYLOAD.get_collector_packages()
+ for pack in coll:
+ pack["children"] = map(settings.PYLOAD.get_file_info, settings.PYLOAD.get_package_files(pack["id"]))
+ return render_to_response(join(settings.TEMPLATE, 'collector.html'), RequestContext(request, {'content': coll}, [status_proc]))
+
+
+@login_required
+@permission('pyload.can_change_status')
+@check_server
+def config(request):
+ return render_to_response(join(settings.TEMPLATE, 'settings.html'), RequestContext(request, {}, [status_proc]))