Skip to content

Commit

Permalink
Start with largest piece size
Browse files Browse the repository at this point in the history
  • Loading branch information
Audionut committed Oct 14, 2024
1 parent f9ab49b commit 3b4c1f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -2474,7 +2474,7 @@ def piece_size(self, value):
def calculate_piece_size(cls, total_size, min_size, max_size, files):
our_min_size = 16384
our_max_size = max_size if max_size else 67108864 # Default to 64 MiB if max_size is None
piece_size = 8388608 # Start with 8 MiB
piece_size = 67108864 # Start with 64 MiB
num_pieces = math.ceil(total_size / piece_size)
torrent_file_size = 20 + (num_pieces * 20) + cls._calculate_pathname_bytes(files) # Approximate .torrent size

Expand Down

0 comments on commit 3b4c1f3

Please sign in to comment.