torrent magnet link bugs fixed
This commit is contained in:
parent
71ea9b22ce
commit
2ea153d644
11
README.md
11
README.md
|
@ -10,6 +10,17 @@ Status
|
|||
===========
|
||||
Basic working prototype with minimal functionality. A lot more to features to come so stay tuned.
|
||||
|
||||
TODO
|
||||
===========
|
||||
-> Set global aria2c configuration
|
||||
-> Adding URIs to existing downloads
|
||||
-> Add download and upload speed graphs and virtualizations
|
||||
-> More global statistics
|
||||
-> More specialized info for special download types like bit torrent and metalink
|
||||
-> Changing configuration of downloads already started
|
||||
-> More advance options for new download
|
||||
-> Adding downloads by uploading torrent and metalink files
|
||||
|
||||
|
||||
Dependencies
|
||||
===========
|
||||
|
|
36
js/script.js
36
js/script.js
|
@ -111,6 +111,9 @@ function changeLength(len, pref) {
|
|||
else if(len <= 1000000) return Math.round(len/1000 * 100)/100 + " k" + pref;
|
||||
else if(len <= 1000000000) return Math.round(len/1000000 *100)/100 + " m" + pref;
|
||||
else if(len <= 1000000000000) return Math.round(len/1000000000 *100)/100 + " g" + pref;
|
||||
}
|
||||
function changeTime(time) {
|
||||
|
||||
}
|
||||
function updateActiveDownloads(data) {
|
||||
var down_template = $('#download_active_template').text();
|
||||
|
@ -120,10 +123,17 @@ function updateActiveDownloads(data) {
|
|||
}
|
||||
for(var i = 0; i < data.length; i++) {
|
||||
var percentage =(data[i].completedLength / data[i].totalLength)*100;
|
||||
percentage = Math.round(percentage*1000)/1000;
|
||||
percentage = Math.round(percentage*100)/100;
|
||||
if(!percentage) percentage = 0;
|
||||
var name;
|
||||
if(data[i].files[0].uris.length) {
|
||||
name = data[i].files[0].uris[0].uri.replace(/^.*[\\\/]/, '');
|
||||
}
|
||||
else {
|
||||
name = data[i].files[0].path.replace(/^.*[\\\/\]]/, '');
|
||||
}
|
||||
ctx = {
|
||||
name: data[i].files[0].uris[0].uri.replace(/^.*[\\\/]/, ''),
|
||||
name: name,
|
||||
status: data[i].status,
|
||||
percentage:percentage,
|
||||
gid: data[i].gid,
|
||||
|
@ -170,10 +180,17 @@ function updateWaitingDownloads(data) {
|
|||
}
|
||||
for(var i = 0; i < data.length; i++) {
|
||||
var percentage =(data[i].completedLength / data[i].totalLength)*100;
|
||||
percentage = Math.round(percentage*1000)/1000;
|
||||
percentage = Math.round(percentage*100)/100;
|
||||
if(!percentage) percentage = 0;
|
||||
var name;
|
||||
if(data[i].files[0].uris.length) {
|
||||
name = data[i].files[0].uris[0].uri.replace(/^.*[\\\/]/, '');
|
||||
}
|
||||
else {
|
||||
name = data[i].files[0].path.replace(/^.*[\\\/\]]/, '');
|
||||
}
|
||||
ctx = {
|
||||
name: data[i].files[0].uris[0].uri.replace(/^.*[\\\/]/, ''),
|
||||
name: name,
|
||||
status: data[i].status,
|
||||
percentage:percentage,
|
||||
gid: data[i].gid,
|
||||
|
@ -221,10 +238,17 @@ function updateStoppedDownloads(data) {
|
|||
}
|
||||
for(var i = 0; i < data.length; i++) {
|
||||
var percentage =(data[i].completedLength / data[i].totalLength)*100;
|
||||
percentage = Math.round(percentage*1000)/1000;
|
||||
percentage = Math.round(percentage*100)/100;
|
||||
if(!percentage) percentage = 0;
|
||||
var name;
|
||||
if(data[i].files[0].uris.length) {
|
||||
name = data[i].files[0].uris[0].uri.replace(/^.*[\\\/]/, '');
|
||||
}
|
||||
else {
|
||||
name = data[i].files[0].path.replace(/^.*[\\\/\]]/, '');
|
||||
}
|
||||
ctx = {
|
||||
name: data[i].files[0].uris[0].uri.replace(/^.*[\\\/]/, ''),
|
||||
name: name,
|
||||
status: data[i].status,
|
||||
percentage:percentage,
|
||||
gid: data[i].gid,
|
||||
|
|
Loading…
Reference in New Issue
Block a user