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
Torrent.__init__(self)
ratio = self.data['share ratio'].split(',')
self['seeder'] = -1
self['leecher'] = -1
if len(ratio) == 2:
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
val = intValue(self.data['downloads'].replace(',','').strip())
if val:
self['downloaded'] = int(val)