1
0
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:
Adam 2014-08-25 11:49:00 +08:00
parent ba5e5478e0
commit 58ff85d030
2 changed files with 5 additions and 6 deletions

View File

@ -167,6 +167,9 @@ class GenericClient(object):
# Sets per provider seed ratio
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'):
r_code = self._add_torrent_uri(result)
else:

View File

@ -84,8 +84,6 @@ class TransmissionAPI(GenericClient):
if result.ratio:
ratio = result.ratio
torrent_id = self._get_torrent_hash(result)
mode = 0
if ratio:
if float(ratio) == -1:
@ -95,7 +93,7 @@ class TransmissionAPI(GenericClient):
ratio = float(ratio)
mode = 1 # Stop seeding at seedRatioLimit
arguments = {'ids': [torrent_id],
arguments = {'ids': [result.hash],
'seedRatioLimit': ratio,
'seedRatioMode': mode
}
@ -108,9 +106,7 @@ class TransmissionAPI(GenericClient):
def _set_torrent_priority(self, result):
torrent_id = self._get_torrent_hash(result)
arguments = {'ids': [torrent_id]}
arguments = {'ids': [result.hash]}
if result.priority == -1:
arguments['priority-low'] = []