mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-12 11:02:21 -05:00
Fix for utorrent label setting
Fix for transmission client
This commit is contained in:
parent
ba5e5478e0
commit
58ff85d030
@ -167,6 +167,9 @@ class GenericClient(object):
|
|||||||
# Sets per provider seed ratio
|
# Sets per provider seed ratio
|
||||||
result.ratio = result.provider.seedRatio()
|
result.ratio = result.provider.seedRatio()
|
||||||
|
|
||||||
|
# lazy fix for now, I'm sure we already do this somewhere else too
|
||||||
|
result = self._get_torrent_hash(result)
|
||||||
|
|
||||||
if result.url.startswith('magnet'):
|
if result.url.startswith('magnet'):
|
||||||
r_code = self._add_torrent_uri(result)
|
r_code = self._add_torrent_uri(result)
|
||||||
else:
|
else:
|
||||||
|
@ -84,8 +84,6 @@ class TransmissionAPI(GenericClient):
|
|||||||
if result.ratio:
|
if result.ratio:
|
||||||
ratio = result.ratio
|
ratio = result.ratio
|
||||||
|
|
||||||
torrent_id = self._get_torrent_hash(result)
|
|
||||||
|
|
||||||
mode = 0
|
mode = 0
|
||||||
if ratio:
|
if ratio:
|
||||||
if float(ratio) == -1:
|
if float(ratio) == -1:
|
||||||
@ -95,7 +93,7 @@ class TransmissionAPI(GenericClient):
|
|||||||
ratio = float(ratio)
|
ratio = float(ratio)
|
||||||
mode = 1 # Stop seeding at seedRatioLimit
|
mode = 1 # Stop seeding at seedRatioLimit
|
||||||
|
|
||||||
arguments = {'ids': [torrent_id],
|
arguments = {'ids': [result.hash],
|
||||||
'seedRatioLimit': ratio,
|
'seedRatioLimit': ratio,
|
||||||
'seedRatioMode': mode
|
'seedRatioMode': mode
|
||||||
}
|
}
|
||||||
@ -108,9 +106,7 @@ class TransmissionAPI(GenericClient):
|
|||||||
|
|
||||||
def _set_torrent_priority(self, result):
|
def _set_torrent_priority(self, result):
|
||||||
|
|
||||||
torrent_id = self._get_torrent_hash(result)
|
arguments = {'ids': [result.hash]}
|
||||||
|
|
||||||
arguments = {'ids': [torrent_id]}
|
|
||||||
|
|
||||||
if result.priority == -1:
|
if result.priority == -1:
|
||||||
arguments['priority-low'] = []
|
arguments['priority-low'] = []
|
||||||
|
Loading…
Reference in New Issue
Block a user