summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/database/FileDatabase.py8
-rw-r--r--module/plugins/ReCaptcha.py (renamed from module/plugins/internal/ReCaptcha.py)1
-rw-r--r--module/web/static/js/models/ConfigHolder.js1
-rw-r--r--module/web/templates/default/dashboard.html1
4 files changed, 8 insertions, 3 deletions
diff --git a/module/database/FileDatabase.py b/module/database/FileDatabase.py
index 67a15912a..023dd1dc5 100644
--- a/module/database/FileDatabase.py
+++ b/module/database/FileDatabase.py
@@ -305,15 +305,17 @@ class FileMethods(DatabaseMethods):
stats.get(r[0], zero_stats) if stats else None
)
+ # TODO: does this need owner?
@async
- def updateLinkInfo(self, data, owner):
+ def updateLinkInfo(self, data):
""" data is list of tuples (name, size, status,[ hash,] url)"""
+ # status in (NA, Offline, Online, Queued, TempOffline)
if data and len(data[0]) == 4:
- self.c.executemany('UPDATE files SET name=?, size=?, dlstatus=? WHERE url=? AND dlstatus IN (0,1,2,3,14)',
+ self.c.executemany('UPDATE files SET name=?, size=?, dlstatus=? WHERE url=? AND dlstatus IN (0,1,2,3,11)',
data)
else:
self.c.executemany(
- 'UPDATE files SET name=?, size=?, dlstatus=?, hash=? WHERE url=? AND dlstatus IN (0,1,2,3,14)', data)
+ 'UPDATE files SET name=?, size=?, dlstatus=?, hash=? WHERE url=? AND dlstatus IN (0,1,2,3,11)', data)
@async
def updateFile(self, f):
diff --git a/module/plugins/internal/ReCaptcha.py b/module/plugins/ReCaptcha.py
index 6f7ebe22c..e47522b4a 100644
--- a/module/plugins/internal/ReCaptcha.py
+++ b/module/plugins/ReCaptcha.py
@@ -3,6 +3,7 @@ import re
class ReCaptcha():
def __init__(self, plugin):
self.plugin = plugin
+ self.plugin.logDebug("Deprecated usage of ReCaptcha: Use CaptchaService instead")
def challenge(self, id):
js = self.plugin.req.load("http://www.google.com/recaptcha/api/challenge", get={"k":id}, cookies=True)
diff --git a/module/web/static/js/models/ConfigHolder.js b/module/web/static/js/models/ConfigHolder.js
index 37af9d70e..b05b1e14b 100644
--- a/module/web/static/js/models/ConfigHolder.js
+++ b/module/web/static/js/models/ConfigHolder.js
@@ -34,6 +34,7 @@ define(['jquery', 'backbone', 'underscore', 'app', './ConfigItem'],
}
});
config.items = items;
+ // TODO: only set new values on success
options = App.apiRequest('saveConfig', {config: config}, options);
diff --git a/module/web/templates/default/dashboard.html b/module/web/templates/default/dashboard.html
index e8041e700..41da71c6c 100644
--- a/module/web/templates/default/dashboard.html
+++ b/module/web/templates/default/dashboard.html
@@ -86,6 +86,7 @@
<ul class="dropdown-menu" role="menu">
<li><a href="#" class="btn-delete"><i class="iconf-trash"></i> Delete</a></li>
<li><a href="#" class="btn-restart"><i class="iconf-refresh"></i> Restart</a></li>
+ {# TODO: only show when finished #}
<li><a href="download/<% fid %>" target="_blank" class="btn-dowload"><i class="iconf-download"></i> Download</a></li>
<li><a href="#" class="btn-share"><i class="iconf-share"></i> Share</a></li>
<li class="divider"></li>