diff options
| author | JP Dillingham <jp@dillingham.me> | 2025-07-07 17:07:31 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-07 17:07:31 -0500 |
| commit | 566a0e54e9578bc1e4543054bb66b016fd397d57 (patch) | |
| tree | 0ce6b4e2b380dbd5182bd17886e80368755a3c55 /src/slskd/Integrations/Scripts/ScriptService.cs | |
| parent | ab13639cc3ba0b056937fc2ea3502291e26fb791 (diff) | |
| parent | 64be2396d66a6861e4525a4aba0faeabf14035e0 (diff) | |
| download | slskd-566a0e54e9578bc1e4543054bb66b016fd397d57.tar.gz | |
Merge branch 'master' into transfer-indexes
Diffstat (limited to 'src/slskd/Integrations/Scripts/ScriptService.cs')
| -rw-r--r-- | src/slskd/Integrations/Scripts/ScriptService.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/slskd/Integrations/Scripts/ScriptService.cs b/src/slskd/Integrations/Scripts/ScriptService.cs index 109cf5ff..f5cc4d4c 100644 --- a/src/slskd/Integrations/Scripts/ScriptService.cs +++ b/src/slskd/Integrations/Scripts/ScriptService.cs @@ -180,7 +180,11 @@ public class ScriptService Log.Debug("Running script '{Script}': \"{Executable}\" {Args} (id: {ProcessId})", script.Key, executable, run.Args ?? string.Join(' ', run.Arglist ?? []), processId); var sw = Stopwatch.StartNew(); - process.StartInfo.EnvironmentVariables["SLSKD_SCRIPT_DATA"] = JsonSerializer.Serialize(data, JsonSerializerOptions); + process.StartInfo.EnvironmentVariables["SLSKD_SCRIPT_DATA"] = JsonSerializer.Serialize( + value: data, + inputType: data.GetType(), // if omitted object is serialized as EventType, losing everything else + options: JsonSerializerOptions); + process.Start(); process.WaitForExit(); |
