From 80c9539e4276a33474b7e214f2be30c1c94b2acf Mon Sep 17 00:00:00 2001 From: Lei Shi Date: Tue, 15 Mar 2022 14:40:10 +0100 Subject: [PATCH] add length to info --- differential/utils/torrent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/differential/utils/torrent.py b/differential/utils/torrent.py index c7fb525..0ee8ebe 100644 --- a/differential/utils/torrent.py +++ b/differential/utils/torrent.py @@ -31,7 +31,7 @@ def remake_torrent(path: Path, tracker: str, old_torrent: str) -> Optional[bytes new_torrent[b'comment'] = f"Generate by Differential {version} made by XGCM" new_torrent[b'info'] = {b'private': 1} for k, v in torrent[b'info'].items(): - if k in (b'files', b'name', b'piece length', b'pieces'): + if k in (b'length', b'files', b'name', b'piece length', b'pieces'): new_torrent[b'info'][k] = v return bencodepy.encode(new_torrent)