$def with (torrent_list, all_torrents) $:render.header(_('Torrent list'))
$:category_tabs(all_torrents)
$:(sort_head('calc_state_str', 'S')) $:(sort_head('queue_pos', '#')) $:(sort_head('name', _('Name'))) $:(sort_head('total_size', _('Size'))) $:(sort_head('progress', _('Progress'))) $if (not get('category')): $:(sort_head('category', _('Tracker'))) $:(sort_head('num_seeds', _('Seeders'))) $:(sort_head('num_peers', _('Peers'))) $:(sort_head('download_rate', _('Download'))) $:(sort_head('upload_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: $if (not get('category')):
$torrent.queue_pos $(crop(torrent.name, 40)) $fsize(torrent.total_size)
$torrent.message $int(torrent.progress) %
$torrent.category $torrent.num_seeds ($torrent.total_seeds) $torrent.num_peers ($torrent.total_peers) $if (torrent.download_rate): $fspeed(torrent.download_rate) $else:   $if (torrent.upload_rate): $fspeed(torrent.upload_rate) $else:   $torrent.eta $("%.3f" % torrent.distributed_copies) $("%.3f" % torrent.ratio)
$:part_stats()

$:render.footer()