mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-08 01:18:39 +00:00
options-tab:queue;prio first/last
This commit is contained in:
parent
8668e2eb8e
commit
7c2ca86968
3 changed files with 26 additions and 4 deletions
|
@ -2,6 +2,7 @@ $def with (torrent)
|
||||||
<form method="post" action="$base/torrent/options/$torrent.id">
|
<form method="post" action="$base/torrent/options/$torrent.id">
|
||||||
<input type="hidden" name="redir" value="$self_url()">
|
<input type="hidden" name="redir" value="$self_url()">
|
||||||
<table><tr><td valign="top">
|
<table><tr><td valign="top">
|
||||||
|
<b>$_("Download")</b>
|
||||||
<table>
|
<table>
|
||||||
$:(forms.torrent_options(torrent).as_table(["max_download_speed", "max_upload_speed", "max_connections", "max_upload_slots"]))
|
$:(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>
|
<tr><td></td><td><input type="submit" value="$_('Update')"></td></tr>
|
||||||
|
@ -9,7 +10,13 @@ $def with (torrent)
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</td><td valign="top">
|
</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>
|
<table>
|
||||||
$:(forms.torrent_options(torrent).as_table(["prioritize_first_last", "private"]))
|
$:(forms.torrent_options(torrent).as_table(["prioritize_first_last", "private"]))
|
||||||
</table>
|
</table>
|
||||||
|
@ -17,5 +24,7 @@ $def with (torrent)
|
||||||
|
|
||||||
</tr></table>
|
</tr></table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,16 @@ class TorrentOptionsForm(forms.Form):
|
||||||
_("Maximum Up Speed"))
|
_("Maximum Up Speed"))
|
||||||
max_connections = forms.DelugeInt(_("Maximum Connections"))
|
max_connections = forms.DelugeInt(_("Maximum Connections"))
|
||||||
max_upload_slots = forms.DelugeInt(_("Maximum Upload Slots"))
|
max_upload_slots = forms.DelugeInt(_("Maximum Upload Slots"))
|
||||||
|
|
||||||
#general
|
#general
|
||||||
prioritize_first_last = forms.CheckBox(
|
prioritize_first_last = forms.CheckBox(_('Prioritize First/Last'))
|
||||||
_('Prioritize first and last pieces [TODO!]'))
|
|
||||||
#private = forms.CheckBox(_('Private'))
|
#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:
|
class torrent_options:
|
||||||
@deco.check_session
|
@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_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_slots(torrent.id, options['max_upload_slots'])
|
||||||
aclient.set_torrent_max_upload_speed(torrent.id, options['max_upload_speed'])
|
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()
|
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',
|
'max_upload_slots', 'max_download_speed', 'prioritize_first_last',
|
||||||
'private','max_upload_speed','queue','peers',
|
'private','max_upload_speed','queue','peers',
|
||||||
"active_time", "seeding_time", "seed_rank", "is_auto_managed", #stats
|
"active_time", "seeding_time", "seed_rank", "is_auto_managed", #stats
|
||||||
|
"stop_at_ratio","stop_ratio","remove_at_ratio", #ratio
|
||||||
'tracker_host', 'label' #label-plugin
|
'tracker_host', 'label' #label-plugin
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue