that can also be empty on mininova

This commit is contained in:
j 2008-05-25 12:29:24 +02:00
parent 87d7177282
commit 55ff7463b5

View file

@ -109,16 +109,15 @@ class Mininova(Torrent):
return return
Torrent.__init__(self) Torrent.__init__(self)
ratio = self.data['share ratio'].split(',') ratio = self.data['share ratio'].split(',')
val = intValue(ratio[0].replace(',','').strip()) self['seeder'] = -1
if val: self['leecher'] = -1
self['seeder'] = int(val) if len(ratio) == 2:
else: val = intValue(ratio[0].replace(',','').strip())
self['seeder'] = -1 if val:
val = intValue(ratio[1].replace(',','').strip()) self['seeder'] = int(val)
if val: val = intValue(ratio[1].replace(',','').strip())
self['leecher'] = int(val) if val:
else: self['leecher'] = int(val)
self['leecher'] = -1
val = intValue(self.data['downloads'].replace(',','').strip()) val = intValue(self.data['downloads'].replace(',','').strip())
if val: if val:
self['downloaded'] = int(val) self['downloaded'] = int(val)