Skip to content

Exclude common padding files from torrent_files #166

Description

@Send8213
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions