diff --git a/ox/mininova.py b/ox/mininova.py index 908982c..c569e6a 100644 --- a/ox/mininova.py +++ b/ox/mininova.py @@ -109,16 +109,15 @@ class Mininova(Torrent): return Torrent.__init__(self) ratio = self.data['share ratio'].split(',') - val = intValue(ratio[0].replace(',','').strip()) - if val: - self['seeder'] = int(val) - else: - self['seeder'] = -1 - val = intValue(ratio[1].replace(',','').strip()) - if val: - self['leecher'] = int(val) - else: - self['leecher'] = -1 + self['seeder'] = -1 + self['leecher'] = -1 + if len(ratio) == 2: + val = intValue(ratio[0].replace(',','').strip()) + if val: + self['seeder'] = int(val) + val = intValue(ratio[1].replace(',','').strip()) + if val: + self['leecher'] = int(val) val = intValue(self.data['downloads'].replace(',','').strip()) if val: self['downloaded'] = int(val)