diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-04-11 23:25:40 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-04-11 23:25:40 -0500 |
| commit | bfc09fecdd2bf552817b7fe83a2f64becc3ea1fd (patch) | |
| tree | f8a34326f38b2e215d91a828e6b805c34f91ad1d /src | |
| parent | aeb6d4c0b7f68c565fa803301383943db06862fc (diff) | |
| download | slskd-bfc09fecdd2bf552817b7fe83a2f64becc3ea1fd.tar.gz | |
add errors for deprecated keys
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Core/Options.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs index a94fdadb..7b38143e 100644 --- a/src/slskd/Core/Options.cs +++ b/src/slskd/Core/Options.cs @@ -253,6 +253,12 @@ namespace slskd [Validate] public SharesOptions Shares { get; init; } = new SharesOptions(); + [Obsolete("temporary sentinel to warn users about breaking change. use Transfers instead.")] + public object Global { get; init; } = null; + + [Obsolete("temporary sentinel to warn users about breaking change. use Transfers instead.")] + public object Groups { get; init; } = null; + /// <summary> /// Gets transfer options. /// </summary> @@ -324,6 +330,9 @@ namespace slskd [Validate] public SoulseekOptions Soulseek { get; init; } = new SoulseekOptions(); + [Obsolete("temporary sentinel to warn users about breaking change. use Integrations instead.")] + public object Integration { get; init; } = null; + /// <summary> /// Gets options for external integrations. /// </summary> @@ -344,6 +353,18 @@ namespace slskd results.Add(new ValidationResult($"Instance name must be something other than '{Program.LocalHostName}' when operating in Relay Agent mode")); } +#pragma warning disable CS0618 // Type or member is obsolete + if (Groups is not null || Global is not null) + { + results.Add(new ValidationResult("The 'global' and 'groups' keys have been moved under a new 'transfers' key. See https://github.com/slskd/slskd/pull/1672 for details, and make the necessary changes to remove this error")); + } + + if (Integration is not null) + { + results.Add(new ValidationResult("The 'integration' key has been renamed to 'integrations'. Add an 's' to the end of the key to remove this error (no other changes were made)")); + } +#pragma warning restore CS0618 // Type or member is obsolete + return results; } |
