github Listenarrs/Listenarr v1.10.3-canary
Canary 1.10.3

pre-release39 minutes ago

Fixes #980

Summary

POST /api/v1/configuration/startupconfig bound the whole StartupConfig and the writer serialised it over config.json, so every property the body left out was written back as null. A body of just { "authenticationRequired": "false" }, which the settings view sends when its initial GET failed, erased the API key, bind address, port, SSL settings and log level. This takes the issue's option 3: the endpoint merges server-side, and the settings view refuses to post a startup config it never loaded.

Changes

  • StartupConfigPatchReader.ApplyTo overlays the properties a body actually carries onto the configuration the server holds. It walks StartupConfig by reflection, so later additions are merged automatically, and nested objects such as ffmpeg merge in turn. Values are read with the serializer defaults MVC binds with, so a quoted number such as "8080" is still accepted.
  • SaveStartupConfig binds JsonElement, so "absent" and "sent as null" can be told apart. The contract changes from replace to merge: clearing a property means sending null or an empty string. A body that is not a JSON object, or has a property of the wrong type, still gets a 400, now with a plain message instead of a ValidationProblemDetails; an empty body still gets the framework's response. There is no [Consumes] restriction, so text/json is still accepted.
  • SettingsView shows a toast and skips the post when the load failed.

Testing

Control: an uncommitted scratch test through the real MVC pipeline, with only IStartupConfigService stubbed, ran on canary e1a1d12 and on this branch (final revision 499b5e4) from the same stored config.

Case Canary This branch
{"authenticationRequired":"false"} other keys written as null other keys kept
{} or unknown property wipes the file every key kept
`{"ffmpeg":{"...

Automated Canary build

Don't miss a new Listenarr release

NewReleases is sending notifications on new releases.