mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 03:24:54 +00:00
Fix num_pieces calculation
This commit is contained in:
parent
1b3448ad91
commit
80634db44c
1 changed files with 3 additions and 0 deletions
|
@ -133,6 +133,9 @@ class TorrentMetadata(object):
|
|||
|
||||
# Calculate the number of pieces we will require for the data
|
||||
num_pieces = datasize / piece_size
|
||||
if datasize % piece_size:
|
||||
num_pieces += 1
|
||||
|
||||
torrent["info"]["piece length"] = piece_size
|
||||
|
||||
# Create the info
|
||||
|
|
Loading…
Add table
Reference in a new issue