mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
Add transmission seed for X hours option
This commit is contained in:
parent
1f8cf44ea2
commit
2b9945e0df
@ -63,7 +63,7 @@ $(document).ready(function(){
|
||||
$('#Torrent_username').show();
|
||||
$('#Torrent_Path').show();
|
||||
$('#Torrent_Ratio').show();
|
||||
$('#Torrent_Seed_Time').hide();
|
||||
$('#Torrent_Seed_Time').show();
|
||||
$('#Torrent_High_Bandwidth').show();
|
||||
$('#Torrent_Label').hide();
|
||||
$('#host_desc').html('Transmission Host');
|
||||
|
@ -104,6 +104,24 @@ class TransmissionAPI(GenericClient):
|
||||
|
||||
return self.response.json()['result'] == "success"
|
||||
|
||||
def _set_torrent_seed_time(self, result):
|
||||
|
||||
if sickbeard.TORRENT_SEED_TIME:
|
||||
time = 60 * float(sickbeard.TORRENT_SEED_TIME)
|
||||
arguments = {'ids': [result.hash],
|
||||
'seedIdleLimit': time,
|
||||
'seedIdleMode': 1
|
||||
}
|
||||
|
||||
post_data = json.dumps({'arguments': arguments,
|
||||
'method': 'torrent-set',
|
||||
})
|
||||
self._request(method='post', data=post_data)
|
||||
|
||||
return self.response.json()['result'] == "success"
|
||||
else:
|
||||
return True
|
||||
|
||||
def _set_torrent_priority(self, result):
|
||||
|
||||
arguments = {'ids': [result.hash]}
|
||||
|
Loading…
Reference in New Issue
Block a user