tweak the seeds and peers renderers to match the gtk ones

This commit is contained in:
Damien Churchill 2009-04-01 21:53:41 +00:00
parent 583d76ca18
commit 141d254f35
1 changed files with 10 additions and 2 deletions

View File

@ -53,11 +53,19 @@ function progress(value, p, r) {
} }
function seeds(value, p, r) { function seeds(value, p, r) {
return String.format("{0} ({1})", value, r.data['total_seeds']); if (r.data['total_seeds'] > -1) {
return String.format("{0} ({1})", value, r.data['total_seeds']);
} else {
return value;
}
} }
function peers(value, p, r) { function peers(value, p, r) {
return String.format("{0} ({1})", value, r.data['total_peers']); if (r.data['total_peers'] > -1) {
return String.format("{0} ({1})", value, r.data['total_peers']);
} else {
return value;
}
} }
function avail(value) { function avail(value) {