Skip to content

Commit

Permalink
Typo and nonsensical default
Browse files Browse the repository at this point in the history
  • Loading branch information
Oppen authored Sep 22, 2024
1 parent 7f2b185 commit cba4f84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The `StorageConfig` struct contains settings related to storage.
| Environment variable | Default | Required | Description |
| -------------------- | ----------------- | -------- | ---------------------------------------- |
| `SHIORI_DIR` | (current dir) | No | Directory where Shiori stores its data. |
| `SHIORI_MAX_PAR_DL` | (num logicl CPU) | No | Number of parallel articles to download. |
| `SHIORI_MAX_PAR_DL` | (num logical CPU) | No | Number of parallel articles to download. |

#### The data Directory

Expand Down
4 changes: 2 additions & 2 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ type DatabaseConfig struct {

type StorageConfig struct {
DataDir string `env:"DIR"` // Using DIR to be backwards compatible with the old config
MaxParDl int `env:"MAX_PAR_DL,default=-1"`
MaxParDl int `env:"MAX_PAR_DL"`
}

type Config struct {
Expand All @@ -111,7 +111,7 @@ func (c Config) SetDefaults(logger *logrus.Logger, portableMode bool) {
}
}

if c.Storage.MaxParDl == -1 {
if c.Storage.MaxParDl == 0 {
c.Storage.MaxParDl = runtime.NumCPU()
}

Expand Down

0 comments on commit cba4f84

Please sign in to comment.