Removed stop_complete option, Can instead be disabled by setting seed_ratio to zero on the provider.
This commit is contained in:
@@ -35,14 +35,6 @@ config = [{
|
||||
'name': 'label',
|
||||
'description': 'Label to apply on added torrents.',
|
||||
},
|
||||
{
|
||||
'name': 'stop_complete',
|
||||
'label': 'Stop torrent',
|
||||
'default': False,
|
||||
'advanced': True,
|
||||
'type': 'bool',
|
||||
'description': 'Stop the torrent after it finishes seeding'
|
||||
},
|
||||
{
|
||||
'name': 'remove_complete',
|
||||
'label': 'Remove torrent',
|
||||
|
||||
@@ -43,7 +43,7 @@ class rTorrent(Downloader):
|
||||
if data.get('seed_time'):
|
||||
log.info('seeding time ignored, not supported')
|
||||
|
||||
if not name or not data.get('seed_ratio'):
|
||||
if not name:
|
||||
return False
|
||||
|
||||
if not self.connect():
|
||||
@@ -57,13 +57,16 @@ class rTorrent(Downloader):
|
||||
log.debug('Updating provider ratio to %s, group name: %s', (data.get('seed_ratio'), name))
|
||||
|
||||
group = self.rt.get_group(name)
|
||||
group.get_min(data.get('seed_ratio') * 100)
|
||||
|
||||
if self.conf('stop_complete'):
|
||||
if data.get('seed_ratio'):
|
||||
group.set_min(int(data.get('seed_ratio') * 100))
|
||||
group.set_command('d.stop')
|
||||
else:
|
||||
# Reset group action
|
||||
group.set_command()
|
||||
|
||||
return True
|
||||
|
||||
|
||||
def download(self, data, movie, filedata=None):
|
||||
log.debug('Sending "%s" (%s) to rTorrent.', (data.get('name'), data.get('type')))
|
||||
|
||||
Reference in New Issue
Block a user