options-tab:queue;prio first/last
This commit is contained in:
parent
8668e2eb8e
commit
7c2ca86968
|
@ -2,6 +2,7 @@ $def with (torrent)
|
|||
<form method="post" action="$base/torrent/options/$torrent.id">
|
||||
<input type="hidden" name="redir" value="$self_url()">
|
||||
<table><tr><td valign="top">
|
||||
<b>$_("Download")</b>
|
||||
<table>
|
||||
$:(forms.torrent_options(torrent).as_table(["max_download_speed", "max_upload_speed", "max_connections", "max_upload_slots"]))
|
||||
<tr><td></td><td><input type="submit" value="$_('Update')"></td></tr>
|
||||
|
@ -9,7 +10,13 @@ $def with (torrent)
|
|||
|
||||
</table>
|
||||
</td><td valign="top">
|
||||
<b>$_("Queue")</b>
|
||||
<table>
|
||||
$:(forms.torrent_options(torrent).as_table(["is_auto_managed", "stop_at_ratio", "stop_ratio", "remove_at_ratio"]))
|
||||
</table>
|
||||
|
||||
</td><td valign="top">
|
||||
<b>$_("General")</b>
|
||||
<table>
|
||||
$:(forms.torrent_options(torrent).as_table(["prioritize_first_last", "private"]))
|
||||
</table>
|
||||
|
@ -17,5 +24,7 @@ $def with (torrent)
|
|||
|
||||
</tr></table>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
|
|
@ -18,10 +18,16 @@ class TorrentOptionsForm(forms.Form):
|
|||
_("Maximum Up Speed"))
|
||||
max_connections = forms.DelugeInt(_("Maximum Connections"))
|
||||
max_upload_slots = forms.DelugeInt(_("Maximum Upload Slots"))
|
||||
|
||||
#general
|
||||
prioritize_first_last = forms.CheckBox(
|
||||
_('Prioritize first and last pieces [TODO!]'))
|
||||
#private = forms.CheckBox(_('Private'))
|
||||
prioritize_first_last = forms.CheckBox(_('Prioritize First/Last'))
|
||||
|
||||
#Ratio
|
||||
is_auto_managed = forms.CheckBox(_('Auto Managed'))
|
||||
stop_at_ratio = forms.CheckBox(_('Stop seed at ratio'))
|
||||
stop_ratio = forms.FloatField(min_value=-1)
|
||||
remove_at_ratio = forms.CheckBox(_('Remove at ratio'))
|
||||
|
||||
|
||||
class torrent_options:
|
||||
@deco.check_session
|
||||
|
@ -41,7 +47,13 @@ class torrent_options:
|
|||
aclient.set_torrent_max_download_speed(torrent.id, options['max_download_speed'])
|
||||
aclient.set_torrent_max_upload_slots(torrent.id, options['max_upload_slots'])
|
||||
aclient.set_torrent_max_upload_speed(torrent.id, options['max_upload_speed'])
|
||||
#aclient.set_torrent_private_flag(torrent.id, options['private'])
|
||||
|
||||
aclient.set_torrent_prioritize_first_last(torrent.id, options['prioritize_first_last'])
|
||||
aclient.set_torrent_auto_managed(torrent.id, options['is_auto_managed'])
|
||||
aclient.set_torrent_stop_at_ratio(torrent.id, options['stop_at_ratio'])
|
||||
aclient.set_torrent_stop_ratio(torrent.id, options['stop_ratio'])
|
||||
aclient.set_torrent_remove_at_ratio(torrent.id, options['remove_at_ratio'])
|
||||
|
||||
|
||||
aclient.force_call()
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ TORRENT_KEYS = ['name', 'total_size', 'num_files', 'num_pieces', 'piece_length',
|
|||
'max_upload_slots', 'max_download_speed', 'prioritize_first_last',
|
||||
'private','max_upload_speed','queue','peers',
|
||||
"active_time", "seeding_time", "seed_rank", "is_auto_managed", #stats
|
||||
"stop_at_ratio","stop_ratio","remove_at_ratio", #ratio
|
||||
'tracker_host', 'label' #label-plugin
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in New Issue