This commit is contained in:
Kfir Hadas 2017-06-07 19:38:19 +03:00
parent 2246f019ea
commit 6f526de5ea
2 changed files with 7 additions and 2 deletions

View File

@ -322,7 +322,11 @@ def v2_api_info(torrent_id_or_hash):
'information': torrent.information,
'description': torrent.description,
'stats': {'seeders': torrent.stats.seed_count, 'leechers': torrent.stats.leech_count, 'downloads': torrent.stats.download_count},
'stats': {
'seeders': torrent.stats.seed_count,
'leechers': torrent.stats.leech_count,
'downloads': torrent.stats.download_count
},
'filesize': torrent.filesize,
'files': files,

View File

@ -112,7 +112,8 @@ if __name__ == '__main__':
exit(1)
else:
formatted_filesize = easy_file_size(response.get('filesize', 0))
flag_info = ', '.join(n+': '+_as_yes_no(response['is_'+n.lower()]) for n in FLAG_NAMES)
flag_info = ', '.join(
n + ': ' + _as_yes_no(response['is_' + n.lower()]) for n in FLAG_NAMES)
info_str = INFO_TEMPLATE.format(formatted_filesize=formatted_filesize,
flag_info=flag_info, **response)