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 c706711 commit 201b590
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -514,6 +514,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
Expand Up @@ -41,6 +41,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 @@ -84,7 +86,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 @@ -234,7 +236,6 @@ func main() {
config.Cookie = string(data)
}
}
var singleThreadSpeedLimit string
if singleThreadSpeedLimit == "" || singleThreadSpeedLimit == "0" {
config.SingleThreadSpeedLimit = 0
} else {
Expand Down

0 comments on commit 201b590

Please sign in to comment.