Compare commits

...

2 Commits

Author SHA1 Message Date
db73b51e0d gitignore: ignore downloaded media so an in-tree run can't commit content
running got in the repo root drops downloaded files next to the source;
torrents/control files were already ignored, add common media (mkv/mp4/
avi/mov/webm/iso/mp3/flac) so anime/ISO downloads don't show up as
untracked and can't be committed by accident.
2026-06-20 21:54:29 +09:00
27a5cece41 cli: show -x/-s/-k in basic help, matching aria2
max-connection-per-server, split and min-split-size were tagged HTTP, so
they only appeared under --help=all. aria2 tags all three TAG_BASIC; tag
them Basic too so they show in the default --help, where users expect the
core connection knobs.
2026-06-20 21:53:33 +09:00
2 changed files with 13 additions and 3 deletions

10
.gitignore vendored
View File

@@ -7,3 +7,13 @@ ref/
bin/
.torrent.db*
*.part
# media downloaded by running got in the repo tree (never commit content)
*.mkv
*.mp4
*.avi
*.mov
*.webm
*.iso
*.mp3
*.flac

View File

@@ -78,9 +78,9 @@ var options = []Opt{
{Long: "human-readable", Kind: Bool, Default: "true", Help: "show sizes as Ki/Mi/Gi", Tag: Basic},
// --- http ---
{Long: "max-connection-per-server", Short: 'x', Kind: Int, Default: "1", Min: 1, Max: 16, Help: "max connections to one server (1-16)", Tag: HTTP},
{Long: "split", Short: 's', Kind: Int, Default: "5", Min: 1, Help: "split a download into N connections; actual connections are min(max-connection-per-server, split), and -x defaults to 1", Tag: HTTP},
{Long: "min-split-size", Short: 'k', Kind: Size, Default: "20M", Min: 1 << 20, Max: 1 << 30, Help: "do not split a piece smaller than SIZE (1M-1024M)", Tag: HTTP},
{Long: "max-connection-per-server", Short: 'x', Kind: Int, Default: "1", Min: 1, Max: 16, Help: "max connections to one server (1-16)", Tag: Basic},
{Long: "split", Short: 's', Kind: Int, Default: "5", Min: 1, Help: "split a download into N connections; actual connections are min(max-connection-per-server, split), and -x defaults to 1", Tag: Basic},
{Long: "min-split-size", Short: 'k', Kind: Size, Default: "20M", Min: 1 << 20, Max: 1 << 30, Help: "do not split a piece smaller than SIZE (1M-1024M)", Tag: Basic},
{Long: "auto-split", Kind: Bool, Default: "false", Help: "got-only: pick the connection count from file size (one per min-split-size, up to 16); overrides -x/-s", Tag: HTTP},
{Long: "force-sequential", Short: 'Z', Kind: Bool, Default: "false", Help: "download each command-line URI as its own file instead of mirroring them", Tag: HTTP},
{Long: "max-tries", Short: 'm', Kind: Int, Default: "5", Min: 0, Help: "max retries per segment (0 = unlimited)", Tag: HTTP},