[Core] Remove deprecated lt torrent priority
This commit is contained in:
parent
089c0be89b
commit
3ed7202253
|
@ -114,8 +114,7 @@ DEFAULT_PREFS = {
|
|||
'cache_expiry': 60,
|
||||
'auto_manage_prefer_seeds': False,
|
||||
'shared': False,
|
||||
'super_seeding': False,
|
||||
'priority': 0
|
||||
'super_seeding': False
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -129,14 +129,13 @@ class TorrentOptions(dict):
|
|||
owner (str): The user this torrent belongs to.
|
||||
pre_allocate_storage (bool): When adding the torrent should all files be pre-allocated.
|
||||
prioritize_first_last_pieces (bool): Prioritize the first and last pieces in the torrent.
|
||||
priority (int): Torrent bandwidth priority with a range [0..255], 0 is lowest and default priority.
|
||||
remove_at_ratio (bool): Remove the torrent when it has reached the stop_ratio.
|
||||
seed_mode (bool): Assume that all files are present for this torrent (Only used when adding a torent).
|
||||
sequential_download (bool): Download the pieces of the torrent in order.
|
||||
shared (bool): Enable the torrent to be seen by other Deluge users.
|
||||
stop_at_ratio (bool): Stop the torrent when it has reached stop_ratio.
|
||||
stop_ratio (float): The seeding ratio to stop (or remove) the torrent at.
|
||||
super_seeding (bool): Enable super seeding/initial seeding.
|
||||
remove_at_ratio (bool): Remove the torrent when it has reached the stop_ratio.
|
||||
"""
|
||||
def __init__(self):
|
||||
super(TorrentOptions, self).__init__()
|
||||
|
@ -152,7 +151,6 @@ class TorrentOptions(dict):
|
|||
'move_completed': 'move_completed',
|
||||
'move_completed_path': 'move_completed_path',
|
||||
'pre_allocate_storage': 'pre_allocate_storage',
|
||||
'priority': 'priority',
|
||||
'prioritize_first_last_pieces': 'prioritize_first_last_pieces',
|
||||
'remove_at_ratio': 'remove_seed_at_ratio',
|
||||
'sequential_download': 'sequential_download',
|
||||
|
@ -520,23 +518,6 @@ class Torrent(object):
|
|||
"""The location for downloading torrent data."""
|
||||
self.options['download_location'] = download_location
|
||||
|
||||
def set_priority(self, priority):
|
||||
"""Sets the bandwidth priority of this torrent.
|
||||
|
||||
Bandwidth is not distributed strictly in order of priority, but the priority is used as a weight.
|
||||
Accepted priority range is [0..255] where 0 is lowest (and default) priority.
|
||||
|
||||
priority (int): the torrent priority
|
||||
|
||||
Raises:
|
||||
ValueError: If value of priority is not in range [0..255]
|
||||
"""
|
||||
if 0 <= priority <= 255:
|
||||
self.options['priority'] = priority
|
||||
return self.handle.set_priority(priority)
|
||||
else:
|
||||
raise ValueError('Torrent priority, %s, is invalid, should be [0..255]', priority)
|
||||
|
||||
def set_owner(self, account):
|
||||
"""Sets the owner of this torrent.
|
||||
|
||||
|
@ -1045,7 +1026,6 @@ class Torrent(object):
|
|||
'super_seeding': lambda: self.status.super_seeding,
|
||||
'time_since_download': lambda: self.status.time_since_download,
|
||||
'time_since_upload': lambda: self.status.time_since_upload,
|
||||
'priority': lambda: self.status.priority,
|
||||
}
|
||||
|
||||
def pause(self):
|
||||
|
|
|
@ -74,7 +74,6 @@ class TorrentState: # pylint: disable=old-style-class
|
|||
owner=None,
|
||||
shared=False,
|
||||
super_seeding=False,
|
||||
priority=0,
|
||||
name=None):
|
||||
# Build the class atrribute list from args
|
||||
for key, value in locals().items():
|
||||
|
@ -602,7 +601,6 @@ class TorrentManager(component.Component):
|
|||
torrent.options['owner'],
|
||||
torrent.options['shared'],
|
||||
torrent.options['super_seeding'],
|
||||
torrent.options['priority'],
|
||||
torrent.options['name']
|
||||
)
|
||||
state.torrents.append(torrent_state)
|
||||
|
|
Loading…
Reference in New Issue