Show files in single-file mode
Since it may be useful for scripting purposes, show file list, even for single-file torrents. type: changed
This commit is contained in:
parent
43d87c06b6
commit
f7e9e80f97
4
justfile
4
justfile
|
@ -11,6 +11,10 @@ stats PATH:
|
||||||
cargo build --release
|
cargo build --release
|
||||||
time ./target/release/imdl --unstable torrent stats --input {{PATH}}
|
time ./target/release/imdl --unstable torrent stats --input {{PATH}}
|
||||||
|
|
||||||
|
push: check
|
||||||
|
! git branch | grep '* master'
|
||||||
|
git push github
|
||||||
|
|
||||||
# clean up feature branch BRANCH
|
# clean up feature branch BRANCH
|
||||||
done BRANCH:
|
done BRANCH:
|
||||||
git checkout master
|
git checkout master
|
||||||
|
|
|
@ -84,6 +84,7 @@ Content Size 20 bytes
|
||||||
Piece Size 16 KiB
|
Piece Size 16 KiB
|
||||||
Piece Count 1
|
Piece Count 1
|
||||||
File Count 1
|
File Count 1
|
||||||
|
Files foo
|
||||||
";
|
";
|
||||||
|
|
||||||
assert_eq!(have, want);
|
assert_eq!(have, want);
|
||||||
|
@ -115,6 +116,7 @@ Trackers\tannounce\tb\tc
|
||||||
Piece Size\t16384
|
Piece Size\t16384
|
||||||
Piece Count\t1
|
Piece Count\t1
|
||||||
File Count\t1
|
File Count\t1
|
||||||
|
Files\tfoo
|
||||||
";
|
";
|
||||||
|
|
||||||
assert_eq!(have, want);
|
assert_eq!(have, want);
|
||||||
|
|
|
@ -130,7 +130,10 @@ impl TorrentSummary {
|
||||||
table.row("Piece Count", self.metainfo.info.pieces.len() / 20);
|
table.row("Piece Count", self.metainfo.info.pieces.len() / 20);
|
||||||
|
|
||||||
match &self.metainfo.info.mode {
|
match &self.metainfo.info.mode {
|
||||||
Mode::Single { .. } => table.row("File Count", 1),
|
Mode::Single { .. } => {
|
||||||
|
table.row("File Count", 1);
|
||||||
|
table.row("Files", &self.metainfo.info.name);
|
||||||
|
}
|
||||||
Mode::Multiple { files } => {
|
Mode::Multiple { files } => {
|
||||||
table.row("File Count", files.len());
|
table.row("File Count", files.len());
|
||||||
table.directory(
|
table.directory(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user