Skip to content

Commit 0bec972

Browse files
committed
Merge remote-tracking branch 'lAnubisl/bug/55-some-trackers-require-private0-to-be-set-explicitly'
2 parents 33a31cb + d8b1438 commit 0bec972

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

BencodeNET/Torrents/Torrent.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,7 @@ protected virtual BDictionary CreateInfoDictionary(Encoding encoding)
307307
if (Pieces?.Length > 0)
308308
info[TorrentInfoFields.Pieces] = new BString(Pieces, encoding);
309309

310-
if (IsPrivate)
311-
info[TorrentInfoFields.Private] = (BNumber)1;
310+
info[TorrentInfoFields.Private] = (BNumber)(IsPrivate ? 1 : 0);
312311

313312
if (FileMode == TorrentFileMode.Single)
314313
{

0 commit comments

Comments
 (0)