summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/plugins/Plugin.py4
-rw-r--r--module/web/media/default/js/funktions.js4
-rw-r--r--module/web/templates/default/home.html12
3 files changed, 11 insertions, 9 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index a12dfa686..27e54cdc2 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -235,7 +235,9 @@ class Plugin(object):
task.removeTask()
#temp.unlink(temp.name)
self.fail(_("No Client connected for captcha decrypting, or pil and tesseract not installed"))
- if self.pyfile.abort: raise Abort
+ if self.pyfile.abort:
+ task.removeTask()
+ raise Abort
sleep(1)
result = task.getResult()
task.removeTask()
diff --git a/module/web/media/default/js/funktions.js b/module/web/media/default/js/funktions.js
index 882d569d9..c0f38b0bb 100644
--- a/module/web/media/default/js/funktions.js
+++ b/module/web/media/default/js/funktions.js
@@ -1,11 +1,11 @@
// JavaScript Document
function HumanFileSize(size)
{
- var filesizename = new Array("KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB");
+ var filesizename = new Array("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB");
var loga = Math.log(size)/Math.log(1024);
var i = Math.floor(loga);
var a = Math.pow(1024, i);
- return (size == 0) ? "0 KB" : (Math.round( size / a , 2) + " " + filesizename[i]);
+ return (size == 0) ? "0 B" : (Math.round( size / a , 2) + " " + filesizename[i]);
}
Array.prototype.remove = function(from, to) {
diff --git a/module/web/templates/default/home.html b/module/web/templates/default/home.html
index da493ee78..97d245a38 100644
--- a/module/web/templates/default/home.html
+++ b/module/web/templates/default/home.html
@@ -96,7 +96,7 @@ var LinkEntry = new Class({
name: $("link_{id}_name".substitute({id: this.id})),
status: $("link_{id}_status".substitute({id: this.id})),
info: $("link_{id}_info".substitute({id: this.id})),
- kbleft: $("link_{id}_kbleft".substitute({id: this.id})),
+ bleft: $("link_{id}_kbleft".substitute({id: this.id})),
percent: $("link_{id}_percent".substitute({id: this.id})),
remove: $("link_{id}_remove".substitute({id: this.id})),
pgbTr: $("link_{id}_pgb_tr".substitute({id: this.id})),
@@ -123,11 +123,11 @@ var LinkEntry = new Class({
info: new Element('td', {
'html': item.info
}),
- kbleft: new Element('td', {
+ bleft: new Element('td', {
'html': HumanFileSize(item.size)
}),
percent: new Element('span', {
- 'html': item.percent+ '% / '+ HumanFileSize(item.size-item.kbleft)
+ 'html': item.percent+ '% / '+ HumanFileSize(item.size-item.bleft)
}),
remove: new Element('img',{
'src': 'media/default/img/control_cancel.png',
@@ -152,7 +152,7 @@ var LinkEntry = new Class({
})
};
- this.elements.tr.adopt(this.elements.name,this.elements.status,this.elements.info,this.elements.kbleft,new Element('td').adopt(this.elements.percent,this.elements.remove));
+ this.elements.tr.adopt(this.elements.name,this.elements.status,this.elements.info,this.elements.bleft,new Element('td').adopt(this.elements.percent,this.elements.remove));
this.elements.pgbTr.adopt(new Element('td',{'colspan':5}).adopt(this.elements.pgb));
this.initEffects();
}catch(e){
@@ -174,8 +174,8 @@ var LinkEntry = new Class({
this.elements.name.set('text', item.name);
this.elements.status.set('text', item.statusmsg);
this.elements.info.set('text', item.info);
- this.elements.kbleft.set('text', item.format_size);
- this.elements.percent.set('text', item.percent+ '% / '+ HumanFileSize((item.size-item.kbleft) / (1024)));
+ this.elements.bleft.set('text', item.format_size);
+ this.elements.percent.set('text', item.percent+ '% / '+ HumanFileSize(item.size-item.bleft));
if(!operafix)
{
this.bar.start({