Understand Torrent file modes and extra fields
masterWhen working with the Torrent object, be aware of how file data is structured and how to handle non-standard metadata:
File Modes
- Single-file torrents: The
Fileproperty contains the file info; theFilesproperty isnull. - Multi-file torrents: The
Filesproperty contains a list of file info and the directory name; theFileproperty isnull.
Non-standard fields
Use the ExtraFields property to access or add fields that are not part of the standard torrent specification. Any data added to ExtraFields will overwrite existing data from the Torrent object when the object is encoded back to bencode.