1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Merge pull request #549 from sammy2142/patch-1

Fixes Invalid ratio error when ratio is not set for transmission
This commit is contained in:
echel0n 2014-05-13 05:25:52 -07:00
commit 0257c70990

View File

@ -85,12 +85,12 @@ class TransmissionAPI(GenericClient):
ratio = result.ratio
elif sickbeard.TORRENT_RATIO:
ratio = sickbeard.TORRENT_RATIO
try:
float(ratio)
except ValueError:
logger.log(self.name + u': Invalid Ratio. "' + ratio + u'" is not a number', logger.ERROR)
return False
if ratio:
try:
float(ratio)
except ValueError:
logger.log(self.name + u': Invalid Ratio. "' + ratio + u'" is not a number', logger.ERROR)
return False
torrent_id = self._get_torrent_hash(result)