aboutsummaryrefslogtreecommitdiff
path: root/meta/torrent.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-06-12 13:46:23 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-06-12 13:46:23 +0200
commit083f0732796e8d9bef1db62375c851dcd990fae5 (patch)
treee1a9c00265c3dd25e1a19b91c75598c675312e53 /meta/torrent.go
parent2e9b63801005f3fe9f08255e178ae266ae995b12 (diff)
Add chunk info
Diffstat (limited to 'meta/torrent.go')
-rw-r--r--meta/torrent.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/torrent.go b/meta/torrent.go
index bf57354..9a63fa8 100644
--- a/meta/torrent.go
+++ b/meta/torrent.go
@@ -32,6 +32,8 @@ func (i Info) String() string {
s += fmt.Sprintln(f)
}
s += fmt.Sprintf("%s (%d)\n", i.Name, i.Length)
+ s += fmt.Sprintf("chunks: %d * %d + %d\n",
+ i.Length/i.PieceLength, i.PieceLength, i.Length%i.PieceLength)
return s
}