Add cmd/torrent-create -i

This commit is contained in:
Matt Joiner 2022-03-11 10:47:02 +11:00
parent 9ac5ce70de
commit 0062680e8e
No known key found for this signature in database
GPG Key ID: 6B990B8185E7F782
1 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,7 @@ func main() {
EmptyAnnounceList bool `name:"n" help:"exclude default announce-list entries"`
Comment string `name:"t" help:"comment"`
CreatedBy string `name:"c" help:"created by"`
InfoName *string `name:"i" help:"override info name (defaults to ROOT)"`
tagflag.StartPos
Root string
}
@ -50,6 +51,9 @@ func main() {
if err != nil {
log.Fatal(err)
}
if args.InfoName != nil {
info.Name = *args.InfoName
}
mi.InfoBytes, err = bencode.Marshal(info)
if err != nil {
log.Fatal(err)