summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-07-10 21:15:37 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-07-10 21:15:37 +0200
commit649b6d83843c9f7b1716e7b284514f9fe13882d6 (patch)
tree6ba9c4d66e4c990a1877517f30ff39e21f0d5bc1
parentrender progress correctly again (diff)
downloadpyload-649b6d83843c9f7b1716e7b284514f9fe13882d6.tar.xz
new hoster links, fixed manifest
-rw-r--r--MANIFEST.in4
-rw-r--r--pyload/web/app/scripts/helpers/truncate.js25
-rw-r--r--pyload/web/app/scripts/views/headerView.js2
-rw-r--r--pyload/web/app/templates/default/header/progressbar.html38
-rwxr-xr-xtests/hosterlinks.txt54
5 files changed, 58 insertions, 65 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
index 9c183b361..4390fadfb 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,4 +1,4 @@
-include README.md LICENSE.md CLA pavement.py setup.py paver-minilib.zip
+include README.md LICENSE.md CLA pyload.py pyload-cli.py pavement.py setup.*
recursive-include pyload *.py
recursive-include pyload/plugins *_2*.pyc
@@ -14,7 +14,7 @@ prune pyload/web/app/components
recursive-include docs Makefile *.py *.conf *.rst *.svg *.png
-recursive-include tests *.py *.txt *.sh
+recursive-include tests *.py *.txt *.sh *.org
recursive-include locale *.pot *.mo
diff --git a/pyload/web/app/scripts/helpers/truncate.js b/pyload/web/app/scripts/helpers/truncate.js
new file mode 100644
index 000000000..fb351b776
--- /dev/null
+++ b/pyload/web/app/scripts/helpers/truncate.js
@@ -0,0 +1,25 @@
+require(['underscore','handlebars'], function(_, Handlebars) {
+ 'use strict';
+
+ function truncate(fullStr, options) {
+ var strLen = 30;
+ if (_.isNumber(options))
+ strLen = options;
+
+ if (fullStr.length <= strLen) return fullStr;
+
+ var separator = options.separator || '…';
+
+ var sepLen = separator.length,
+ charsToShow = strLen - sepLen,
+ frontChars = Math.ceil(charsToShow / 2),
+ backChars = Math.floor(charsToShow / 2);
+
+ return fullStr.substr(0, frontChars) +
+ separator +
+ fullStr.substr(fullStr.length - backChars);
+ }
+
+ Handlebars.registerHelper('truncate', truncate);
+ return truncate;
+}); \ No newline at end of file
diff --git a/pyload/web/app/scripts/views/headerView.js b/pyload/web/app/scripts/views/headerView.js
index 10e4dfaf9..991f0f32e 100644
--- a/pyload/web/app/scripts/views/headerView.js
+++ b/pyload/web/app/scripts/views/headerView.js
@@ -165,7 +165,6 @@ define(['jquery', 'underscore', 'backbone', 'app', 'models/ServerStatus', 'colle
if (data === null) return;
if (data['@class'] === 'ServerStatus') {
- // TODO: load interaction when none available
this.status.set(data);
// There tasks at the server, but not in queue: so fetch them
@@ -213,7 +212,6 @@ define(['jquery', 'underscore', 'backbone', 'app', 'models/ServerStatus', 'colle
eta: prog.get('eta')
}, {silent: true});
file.setDownloadStatus(prog.get('download').status);
-
file.trigger('change:progress');
}
}
diff --git a/pyload/web/app/templates/default/header/progressbar.html b/pyload/web/app/templates/default/header/progressbar.html
index e32edb335..a36fb5684 100644
--- a/pyload/web/app/templates/default/header/progressbar.html
+++ b/pyload/web/app/templates/default/header/progressbar.html
@@ -1,26 +1,26 @@
- {{#if single }}
- {{ name }} ({{ statusmsg }})
- {{ else }}
+{{#if single }}
+ {{ truncate name 32}} ({{ statusmsg }})
+{{ else }}
{{#if downloads }}
- {{ downloads }} downloads running {{#if speed }}({{ formatSize speed }}/s){{/if}}
+ {{ downloads }} downloads running {{#if speed }}({{ formatSize speed }}/s){{/if}}
{{ else }}
- No running tasks
- {{/if}}
+ No running tasks
{{/if}}
- <i class="icon-list pull-right"></i>
- <!-- TODO active animation -->
- <div class="progress" id="globalprogress">
- {{#if single }}
- <div class="bar" style="width: {{ percent }}%">
- {{ else }}
- <div class="bar {{#if downloads }}running{{/if}}">
- {{/if}}
- </div>
- </div>
- <div class="sub">
- {{#if linksqueue }}
- {{ linksqueue }} downloads left ({{ formatSize sizequeue }})
+{{/if}}
+<i class="icon-list pull-right"></i>
+<!-- TODO active animation -->
+<div class="progress" id="globalprogress">
+ {{#if single }}
+ <div class="bar" style="width: {{ percent }}%">
+ {{ else }}
+ <div class="bar {{#if downloads }}running{{/if}}">
{{/if}}
+ </div>
+ </div>
+ <div class="sub">
+ {{#if linksqueue }}
+ {{ linksqueue }} downloads left ({{ formatSize sizequeue }})
+ {{/if}}
<span class="pull-right">
{{ formatTime etaqueue }}
</span>
diff --git a/tests/hosterlinks.txt b/tests/hosterlinks.txt
index 70dcc44f6..29331db8f 100755
--- a/tests/hosterlinks.txt
+++ b/tests/hosterlinks.txt
@@ -1,50 +1,20 @@
# -*- coding: utf-8 -*-
# Valid files, with md5 hash
-# Please only use files around 5-15 MB and with explicit permission for redistribution
+[files]
-http://download.pyload.org/random.bin
-random.bin d76505d0869f9f928a17d42d66326307
-Mořská želva ( Зелёная черепаха .&+ 綠蠵龜 _@- Đồi mồi dứa ).tar 932212256dc0b0a1e71c0944eef633a4
-Mořská_želva_(_Зелёная_черепаха_.&+_綠蠵龜__@-_Đồi_mồi_dứa_).tar 932212256dc0b0a1e71c0944eef633a4
+random (机会,ឱកស,ランダム,隨機,лчаный,cơhội,შანსი,కంħن↓∂ƒ_স€קสม®¢äöář_æžĐşiồй_ныứ&+).bin 5dde9e312311d964572f5a33a0992a2c
+random100.bin f346c3ea47d8bfce3a12033129dec8ff
-# Hoster links, append ||offline or ||fail to mark your expectation
+[online]
-http://netload.in/datei9XirAJZs79/random.bin.htm
-http://rapidshare.com/files/445996776/random.bin
-http://hotfile.com/dl/101569859/2e01f04/random.bin.html
-http://www.megaupload.com/?d=1JZLOP3B
-http://www.shragle.com/files/f899389b/random.bin
-http://www10.zippyshare.com/v/76557688/file.html
-http://yourfiles.to/?d=312EC6E911
-http://depositfiles.com/files/k8la98953
-http://uploading.com/files/3896f5a1/random.bin/
+http://download.pyload.org/random%20(%e6%9c%ba%e4%bc%9a%2c%e1%9e%b1%e1%9e%80%e1%9e%9f%2c%e3%83%a9%e3%83%b3%e3%83%80%e3%83%a0%2c%e9%9a%a8%e6%a9%9f%2c%d0%bb%d1%87%d0%b0%d0%bd%d1%8b%d0%b9%2cc%c6%a1h%e1%bb%99i%2c%e1%83%a8%e1%83%90%e1%83%9c%e1%83%a1%e1%83%98%2c%e0%b0%95%e0%b0%82%c4%a7%d9%86%e2%86%93%e2%88%82%c6%92_%e0%a6%b8%e2%82%ac%d7%a7%e0%b8%aa%e0%b8%a1%c2%ae%c2%a2%c3%a4%c3%b6%c3%a1%c5%99_%c3%a6%c5%be%c4%90%c5%9fi%e1%bb%93%d0%b9_%d0%bd%d1%8b%e1%bb%a9%26%2b).bin
+http://www.putlocker.com/file/06DB5A3B9CBAD597
+http://www59.zippyshare.com/v/56973477/file.html
+http://www.share-online.biz/dl/IAOREQPMWG
+http://hbcyum.1fichier.com/
+http://bitshare.com/?f=5a1m0nia
+http://uploaded.net/file/n4fhw1ol
-http://ul.to/file/o41isx||offline
-http://www.4shared.com/file/-O5CBhQV/random.html||offline
-http://www.4shared.com/file/-O5CBhQV/random.html||offline
-http://www.fileserve.com/file/MxjZXjX||offline
-http://www.share-online.biz/download.php?id=PTCOX1GL6XAH||offline
-http://dl.free.fr/d4aL5dyXY||offline
-http://files.mail.ru/32EW66||offline
-http://www.shragle.com/files/f899389b/random.bin||offline
-
-
-# Hoster links with fancy unicode filenames:
-http://vs3iaw.1fichier.com/fr/
-http://www.4shared.com/file/rQltf2Fr/Mosk_elva___Зелная_черепаха___.html
-http://bezvadata.cz/stahnout/99273_morska-zelva-.-d-i-m-i-d-a-.tar
-http://www.crocko.com/A524453DA89841B4BFC4FB9125D6F186/
-http://czshare.com/2483034/zelva
-http://www.easybytez.com/etvhltkg0d05
-http://www.filejungle.com/f/qX5fxT/
-http://fp.io/43798f2b/
-http://www.filesonic.com/file/yU2cU6s
-http://www.fshare.vn/file/A7H8LSTP7Z/
-http://ifile.it/muwgivz
-http://letitbit.net/download/67793.60a7d3745791db7271a6e6c92cfe/Mořská_želva_(_Зелёная_черепаха_.___綠蠵龜___-_Đồi_mồi_dứa_).tar.html
-http://www.mediafire.com/file/n09th58z1x5r585
-http://www.quickshare.cz/stahnout-soubor/676150:morska-zelva----_-oi-moi-dua-tar_6MB
-http://www.uloz.to/12553820/morska-zelva-oi-moi-dua-tar
-http://www.wupload.com/file/2642593407/ \ No newline at end of file
+[offline] \ No newline at end of file