[isohunt] small corrections

This commit is contained in:
Julien Veyssier 2013-03-10 00:33:00 +01:00
commit fe5499c8ac
2 changed files with 9 additions and 9 deletions

View file

@ -25,6 +25,7 @@ from weboob.capabilities.torrent import ICapTorrent, MagnetOnly
from weboob.tools.application.repl import ReplApplication
from weboob.tools.application.formatters.iformatter import IFormatter, PrettyFormatter
from weboob.core import CallErrors
from weboob.capabilities.base import NotAvailable
__all__ = ['Weboorrents']
@ -43,7 +44,8 @@ class TorrentInfoFormatter(IFormatter):
def format_obj(self, obj, alias):
result = u'%s%s%s\n' % (self.BOLD, obj.name, self.NC)
result += 'ID: %s\n' % obj.fullid
result += 'Size: %s\n' % sizeof_fmt(obj.size)
if obj.size != NotAvailable:
result += 'Size: %s\n' % sizeof_fmt(obj.size)
result += 'Seeders: %s\n' % obj.seeders
result += 'Leechers: %s\n' % obj.leechers
result += 'URL: %s\n' % obj.url