From 16c30413dcc1191a0479bbed8524827ed0ebd4fb Mon Sep 17 00:00:00 2001 From: TheAMM Date: Sun, 14 May 2017 20:14:49 +0300 Subject: [PATCH] Remove extra b'e' in torrent generation Fixes #45 Flexget checks for trailing data after bdecoding, which most decoders don't do - so this went unnoticed. --- nyaa/torrents.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nyaa/torrents.py b/nyaa/torrents.py index a8ad6d0..192ab0f 100644 --- a/nyaa/torrents.py +++ b/nyaa/torrents.py @@ -106,6 +106,6 @@ def create_bencoded_torrent(torrent, metadata_base=None): suffix = bencode.encode(suffixed_dict) bencoded_info = torrent.info.info_dict - bencoded_torrent = prefix[:-1] + b'4:info' + bencoded_info + b'e' + suffix[1:] + bencoded_torrent = prefix[:-1] + b'4:info' + bencoded_info + suffix[1:] return bencoded_torrent