Skip to content

Commit

Permalink
doc: single thread speed limit
Browse files Browse the repository at this point in the history
  • Loading branch information
muzea committed Nov 9, 2019
1 parent 990529e commit 937f60a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,8 @@ $ annie -j https://www.bilibili.com/video/av20203945
Use specified Referrer
-cs int
HTTP chunk size for downloading (in MB) (default 0)
-singleThreadSpeedLimit string
Limit the speed of each thread, 0 is unlimited, acceptable input "10MiB", "200KB" (default 0)
```

#### Network:
Expand Down
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ import (
"github.com/iawia002/annie/utils"
)

var singleThreadSpeedLimit string

func init() {
flag.BoolVar(&config.Debug, "d", false, "Debug mode")
flag.BoolVar(&config.Version, "v", false, "Show version")
Expand Down Expand Up @@ -85,7 +87,7 @@ func init() {
flag.StringVar(&config.YoukuPassword, "password", "", "Youku password")
// youtube
flag.BoolVar(&config.YouTubeStream2, "ytb-stream2", false, "Use data in url_encoded_fmt_stream_map")

flag.StringVar(&singleThreadSpeedLimit, "singleThreadSpeedLimit", "", "Limit the speed of each thread, 0 is unlimited")

}
Expand Down Expand Up @@ -241,7 +243,6 @@ func main() {
config.Cookie = string(data)
}
}
var singleThreadSpeedLimit string
if singleThreadSpeedLimit == "" || singleThreadSpeedLimit == "0" {
config.SingleThreadSpeedLimit = 0
} else {
Expand Down

0 comments on commit 937f60a

Please sign in to comment.