Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude common padding files from torrent_files #166

Open
2 tasks done
Send8213 opened this issue Feb 23, 2024 · 1 comment
Open
2 tasks done

Exclude common padding files from torrent_files #166

Send8213 opened this issue Feb 23, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Send8213
Copy link

  • I have checked the existing issues to avoid duplicates
  • I have redacted any info hashes and content metadata from any logs or screenshots attached to this issue

Is your feature request related to a problem? Please describe

BEP47 (padding) and BEP52 (V2) support adding padding files to torrents to ensure that files start at piece boundaries and pieces do not contain parts of more than one file. For backwards compatibility, these padding files are included in the torrent but should be ignored by modern clients and treated as full of all zeros.

Describe the solution you'd like

Do not store file information for these padding files.

Describe alternatives you've considered

Ignoring the padding files when viewing a torrent's files in Bitmagnet.

Additional context

Padding files and extended file attributes: http://bittorrent.org/beps/bep_0047.html :

The recommended path is [".pad", "N"] where N is the length of the padding file in base10.

e.g.:
.pad/1
.pad/2

The BitTorrent Protocol Specification v2 http://bittorrent.org/beps/bep_0052.html :

For interoperability with BEP 3 a torrent can be created to contain the necessary data for both formats. To do so the 'pieces' field and 'files' or 'length' in the info dictionary must be generated to describe the same data in the same order. Since the old format did not align files to piece boundaries a multifile torrent must use BEP 47 padding files to achieve identical alignment.

@Send8213 Send8213 added the enhancement New feature or request label Feb 23, 2024
@Send8213
Copy link
Author

Forgot to mention this from BEP47:

attr
A variable-length string. When present the characters each represent a file attribute. l = symlink, x = executable, h = hidden, p = padding file. Characters appear in no particular order and unknown characters should be ignored.

The padding files should be straightforward to identify with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant