$def with (torrent_list, label_filters) $:(sort_head('state', 'S')) $:(sort_head('queue', '#')) $:(sort_head('name', _('Name'))) $:(sort_head('total_size', _('Size'))) $:(sort_head('progress', _('Progress'))) $:(sort_head('tracker_host', _('Tracker'))) $:(sort_head('num_seeds', _('Seeders'))) $:(sort_head('num_peers', _('Peers'))) $:(sort_head('download_payload_rate', _('Download'))) $:(sort_head('upload_payload_rate', _('Upload'))) $:(sort_head('eta', _('Eta'))) $:(sort_head('distributed_copies', _('Ava'))) $:(sort_head('ratio', _('Ratio'))) $altrow(True) $#4-space indentation is mandatory for for-loops in templetor! $for torrent in torrent_list: $else: 0
$if (torrent.queue == -1): ∞ $else: $(torrent.queue + 1) $(crop(torrent.name, 30)) $fsize(torrent.total_size)
$_(torrent.state) $int(torrent.progress) %
$torrent.tracker_host $if torrent.total_seeds != -1: $torrent.num_seeds ($torrent.total_seeds) $else: 0 $if torrent.total_peers != -1: $torrent.num_peers ($torrent.total_peers) $if (torrent.download_payload_rate): $fspeed(torrent.download_payload_rate) $else:   $if (torrent.upload_payload_rate): $fspeed(torrent.upload_payload_rate) $else:   $ftime(torrent.eta) $("%.2f" % torrent.distributed_copies) $("%.2f" % torrent.ratio)