`Info::infohash` will discard fields not present in the `Info` struct,
and can thus produce an erronous infohash.
To try to prevent this function from being called in those
circumstances, rename it to `Info::infohash_lossy`, and add a comment
explaining why it is dangerous.
Embarassingly, `Info::infohash` was called in
`TorrentSummary::from_input`, and thus transitively by the torrent show
subcommand, where it is definitely not safe, since torrent show is
intended to be used with arbitrary torrents. This is now fixed.
There was also a build failure caused by a cache issue, so change the
cache keys to invalidate the caches.
type: fixed
- Combine test Metainfo values into a small number of globally available
values.
- Serialize update URLs as `URL` insted of `String`.
- Add additional `show` tests
type: reform
Torrents may now be created from standard input by passing `--input -`.
Since `--name` and `--output` cannot be deduced, they are required when
`--input -`.
type: added
The order in which files appear in torrents can now be controlled
with the `--order` flag:
imdl torrent create --input foo --order alphabetical-asc
See `--help` documentation for possible values.
type: added
The --dht-node flag can be used to add DHT bootstrap nodes to new torrents.
This is the only piece of metainfo-related functionality in BEP 5, so we can mark BEP
5 as implemented.
type: added
Adds the command `imdl` torrent verify` to verify the contents of torrents.
This implementation is extremely naive. It does successfully verify torrents,
but it will produce unsatisfying results when a torrent fails verification. In
particular, it won't give any information about which pieces in a file were
corrupt.
type: added
Support adding a `source` key under the `info` dictionary. The `source`
key is commonly used to create distinct torrents for different trackers.
type: added
The `imdl torrent show` command displays information about on-disk
torrent files. The formatting of the command's output is copied from
torf, an excellent command-line torrent creator, editor, and viewer.
type: added