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',
|
'name': 'label',
|
||||||
'description': 'Label to apply on added torrents.',
|
'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',
|
'name': 'remove_complete',
|
||||||
'label': 'Remove torrent',
|
'label': 'Remove torrent',
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class rTorrent(Downloader):
|
|||||||
if data.get('seed_time'):
|
if data.get('seed_time'):
|
||||||
log.info('seeding time ignored, not supported')
|
log.info('seeding time ignored, not supported')
|
||||||
|
|
||||||
if not name or not data.get('seed_ratio'):
|
if not name:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if not self.connect():
|
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))
|
log.debug('Updating provider ratio to %s, group name: %s', (data.get('seed_ratio'), name))
|
||||||
|
|
||||||
group = self.rt.get_group(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')
|
group.set_command('d.stop')
|
||||||
else:
|
else:
|
||||||
|
# Reset group action
|
||||||
group.set_command()
|
group.set_command()
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
def download(self, data, movie, filedata=None):
|
def download(self, data, movie, filedata=None):
|
||||||
log.debug('Sending "%s" (%s) to rTorrent.', (data.get('name'), data.get('type')))
|
log.debug('Sending "%s" (%s) to rTorrent.', (data.get('name'), data.get('type')))
|
||||||
|
|||||||
Reference in New Issue
Block a user