mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-11 05:33:37 +00:00
Add transmission seed for X hours option
This commit is contained in:
parent
1f8cf44ea2
commit
2b9945e0df
2 changed files with 19 additions and 1 deletions
|
@ -63,7 +63,7 @@ $(document).ready(function(){
|
||||||
$('#Torrent_username').show();
|
$('#Torrent_username').show();
|
||||||
$('#Torrent_Path').show();
|
$('#Torrent_Path').show();
|
||||||
$('#Torrent_Ratio').show();
|
$('#Torrent_Ratio').show();
|
||||||
$('#Torrent_Seed_Time').hide();
|
$('#Torrent_Seed_Time').show();
|
||||||
$('#Torrent_High_Bandwidth').show();
|
$('#Torrent_High_Bandwidth').show();
|
||||||
$('#Torrent_Label').hide();
|
$('#Torrent_Label').hide();
|
||||||
$('#host_desc').html('Transmission Host');
|
$('#host_desc').html('Transmission Host');
|
||||||
|
|
|
@ -104,6 +104,24 @@ class TransmissionAPI(GenericClient):
|
||||||
|
|
||||||
return self.response.json()['result'] == "success"
|
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):
|
def _set_torrent_priority(self, result):
|
||||||
|
|
||||||
arguments = {'ids': [result.hash]}
|
arguments = {'ids': [result.hash]}
|
||||||
|
|
Loading…
Reference in a new issue