This commit is contained in:
Martijn Voncken 2008-01-22 18:03:48 +00:00
parent bbe31367d4
commit 9236e9bff2
5 changed files with 6 additions and 5 deletions

View File

@ -129,6 +129,7 @@ template.Template.globals.update({
'self_url': self_url, 'self_url': self_url,
'fspeed': common.fspeed, 'fspeed': common.fspeed,
'fsize': common.fsize, 'fsize': common.fsize,
'ftime':common.ftime,
'render': render, #for easy resuse of templates 'render': render, #for easy resuse of templates
'rev': 'rev.%s' % (REVNO, ), 'rev': 'rev.%s' % (REVNO, ),
'version': VERSION, 'version': VERSION,

View File

@ -114,7 +114,7 @@ $for torrent in torrent_list:
$else: $else:
   
</td> </td>
<td>$torrent.eta</td> <td>$ftime(torrent.eta)</td>
<td>$("%.3f" % torrent.distributed_copies)</td> <td>$("%.3f" % torrent.distributed_copies)</td>
<td>$("%.3f" % torrent.ratio)</td\> <td>$("%.3f" % torrent.ratio)</td\>
</tr> </tr>

View File

@ -40,7 +40,7 @@ $for torrent in torrent_list:
<td>$torrent.num_peers ($torrent.total_peers)</td> <td>$torrent.num_peers ($torrent.total_peers)</td>
<td>$fspeed(torrent.download_rate)</td> <td>$fspeed(torrent.download_rate)</td>
<td>$fspeed(torrent.upload_rate)</td> <td>$fspeed(torrent.upload_rate)</td>
<td>$torrent.eta</td> <td>$ftime(torrent.eta)</td>
<td>$("%.3f" % torrent.distributed_copies)</td> <td>$("%.3f" % torrent.distributed_copies)</td>
<td>$("%.3f" % torrent.ratio)</td\> <td>$("%.3f" % torrent.ratio)</td\>
</tr> </tr>

View File

@ -45,7 +45,7 @@ $fspeed(torrent.download_rate)</td></td></tr>
<td class="info_value">$torrent.num_peers ($torrent.total_peers )</td></tr> <td class="info_value">$torrent.num_peers ($torrent.total_peers )</td></tr>
<tr><td class="info_label">$_('ETA'):</td> <tr><td class="info_label">$_('ETA'):</td>
<td class="info_value">$torrent.eta </td></tr> <td class="info_value">$ftime(torrent.eta) </td></tr>
<tr><td class="info_label">$_('Availability'):</td> <tr><td class="info_label">$_('Availability'):</td>
<td class="info_value">$("%.3f" % torrent.distributed_copies)</td></td></tr> <td class="info_value">$("%.3f" % torrent.distributed_copies)</td></td></tr>
@ -62,7 +62,7 @@ $fspeed(torrent.download_rate)</td></td></tr>
<table> <table>
<tr><td class="info_label">$_('Total Size'):</td> <tr><td class="info_label">$_('Total Size'):</td>
<td class="info_value">$fspeed(torrent.total_size)</td></tr> <td class="info_value">$fsize(torrent.total_size)</td></tr>
<tr><td class="info_label">$_('# Of Files'):</td> <tr><td class="info_label">$_('# Of Files'):</td>
<td class="info_value">$torrent.num_files</td></tr> <td class="info_value">$torrent.num_files</td></tr>

View File

@ -37,7 +37,7 @@ from lib.webpy022 import changequery as self_url, template
from lib.webpy022.utils import Storage from lib.webpy022.utils import Storage
from lib.webpy022.http import seeother, url from lib.webpy022.http import seeother, url
from deluge.common import fsize,fspeed from deluge.common import fsize,fspeed,ftime
import traceback import traceback
import random import random