diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-10-01 14:58:12 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2022-10-01 14:58:12 -0500 |
| commit | a2da84dffa92a0f680c8594ffc024328b313615e (patch) | |
| tree | 636328fc26b0e08f088ae46983dea4eebc9fecd7 | |
| parent | efb613beb826bd27b8296c75d61993bdbdcc0bb5 (diff) | |
| download | slskd-a2da84dffa92a0f680c8594ffc024328b313615e.tar.gz | |
add option to force a scan
| -rw-r--r-- | config/slskd.example.yml | 1 | ||||
| -rw-r--r-- | docs/config.md | 1 | ||||
| -rw-r--r-- | src/slskd/Core/Options.cs | 9 |
3 files changed, 11 insertions, 0 deletions
diff --git a/config/slskd.example.yml b/config/slskd.example.yml index f8658d1c..3b1d7411 100644 --- a/config/slskd.example.yml +++ b/config/slskd.example.yml @@ -7,6 +7,7 @@ # no_start: false # no_connect: false # no_share_scan: false +# force_share_scan: false # no_version_check: false # log_sql: false # directories: diff --git a/docs/config.md b/docs/config.md index dbe34a36..5ad80033 100644 --- a/docs/config.md +++ b/docs/config.md @@ -758,6 +758,7 @@ Several additional feature flags are provided to change the application's runtim | `-x\|--no-start` | `NO_START` | Bootstrap the application, but don't start | | `--no-connect` | `NO_CONNECT` | Start the application, but don't connect to the server | | `--no-share-scan` | `NO_SHARE_SCAN` | Don't perform a scan of shared directories on startup | +| `--force-share-scan` | `FORCE_SHARE_SCAN` | Force a scan of shared directories on startup | | `--no-version-check` | `NO_VERSION_CHECK` | Don't perform a version check on startup | | `--log-sql` | `LOG_SQL` | Log SQL queries generated by Entity Framework | diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs index 937804de..44cc4c71 100644 --- a/src/slskd/Core/Options.cs +++ b/src/slskd/Core/Options.cs @@ -309,6 +309,15 @@ namespace slskd public bool NoShareScan { get; init; } = false; /// <summary> + /// Gets a value indicating whether shares should be forcibly re-scanned on startup. + /// </summary> + [Argument(default, "force-share-scan")] + [EnvironmentVariable("FORCE_SHARE_SCAN")] + [Description("force a share scan on startup")] + [RequiresRestart] + public bool ForceShareScan { get; init; } = false; + + /// <summary> /// Gets a value indicating whether the application should check for a newer version on startup. /// </summary> [Argument(default, "no-version-check")] |
