diff --git a/nyaa/api_handler.py b/nyaa/api_handler.py index 7e17745..bbbd845 100644 --- a/nyaa/api_handler.py +++ b/nyaa/api_handler.py @@ -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, diff --git a/utils/api_info.py b/utils/api_info.py index acff5d7..2f3de9e 100755 --- a/utils/api_info.py +++ b/utils/api_info.py @@ -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)