mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-17 14:55:07 -05:00
Merge pull request #764 from adam111316/transmission_seedtime
Add transmission seed for X hours option
This commit is contained in:
commit
571e7c7d61
@ -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