webui:remove cat, use organize plugin

This commit is contained in:
Martijn Voncken 2008-03-04 21:27:51 +00:00
parent faa5b69db4
commit d2bd2fabcf
3 changed files with 12 additions and 16 deletions

View File

@ -33,8 +33,13 @@ $if organize_filters:
$:(sort_head('name', _('Name')))
$:(sort_head('total_size', _('Size')))
$:(sort_head('progress', _('Progress')))
$if (not get('category')):
$:(sort_head('category', _('Tracker')))
$if organize_filters:
<!--HACK:
abusing organize_filters to check if the Orgnize plugin is enabled
-->
$:(sort_head('tracker_name', _('Tracker')))
$:(sort_head('num_seeds', _('Seeders')))
$:(sort_head('num_peers', _('Peers')))
$:(sort_head('download_rate', _('Download')))
@ -68,8 +73,8 @@ $for torrent in torrent_list:
</div>
</div>
</td>
$if (not get('category')):
<td>$torrent.category</td>
$if organize_filters:
<td>$torrent.tracker_name</td>
<td>
$if torrent.total_seeds != -1:
$torrent.num_seeds ($torrent.total_seeds)

View File

@ -159,12 +159,6 @@ def enhance_torrent_status(torrent_id,status):
status["id"] = torrent_id
url = urlparse(status.tracker)
if hasattr(url,'hostname'):
status.category = url.hostname or 'unknown'
else:
status.category = 'No-tracker'
#0.5-->0.6
status.download_rate = status.download_payload_rate
status.upload_rate = status.upload_payload_rate

View File

@ -78,12 +78,9 @@ TORRENT_KEYS = ['name', 'total_size', 'num_files', 'num_pieces', 'piece_length',
'total_wanted', 'tracker', 'trackers', 'tracker_status', 'save_path',
'files', 'file_priorities', 'compact', 'max_connections',
'max_upload_slots', 'max_download_speed', 'prioritize_first_last',
'private','max_upload_speed','queue'
#REMOVE:
#"is_seed","total_download","total_upload","uploaded_memory",
#"user_paused"
'private','max_upload_speed','queue',
#builtin plugins:
'tracker_name' #organize-plugin
]
STATE_MESSAGES = [