Files
qBittorrent/src/base/bittorrent
Thomas Piccirello 2ebe8595c9 Modify CategoryOptions serialization to JSON
When a category's download path option is set to "Default", its `downloadPath` is serialized into JSON as `undefined`. This results in the `downloadPath` field being omitted from `torrents/categories` and `torrents/maindata` payloads (as is expected with an `undefined` value).

The use of `undefined` here causes an issue in the WebUI. Specifically, when the category previously contained a value for this field (i.e. download path option set to either "Yes" or "No"), the `processMap` logic in `SyncController` does not detect the removal this field. This results in the category's new `downloadPath` not being properly sent to the client. By switching from `undefined` to `null`, we ensure that the `downloadPath` value is always included in the category's payload. This allows `processMap` to properly detect whenever the value changes.

This change is backwards compatible with existing categories.json files. Older qBittorrent versions should also be able to parse new categories.json files containing `null`.

More context: cd3fbfbf9b (r2173148696)

PR #22958.
2025-07-07 00:17:57 +08:00
..
2024-07-04 08:30:39 +03:00
2023-08-11 13:47:55 +08:00
2024-07-04 08:30:39 +03:00
2023-08-11 13:47:55 +08:00
2023-07-20 11:17:27 +03:00
2020-11-17 21:02:37 +03:00
2024-07-04 08:30:39 +03:00
2022-02-12 16:54:38 +08:00
2022-01-25 12:19:50 +08:00
2021-10-02 21:42:58 +03:00
2023-06-26 16:45:44 +08:00
2023-06-26 16:45:44 +08:00
2023-08-11 13:47:55 +08:00
2023-06-01 17:16:03 +03:00
2023-08-11 13:47:55 +08:00
2020-11-17 21:02:37 +03:00
2024-02-25 19:58:58 +08:00
2024-02-25 19:58:58 +08:00
2025-05-01 14:18:18 +03:00
2024-10-06 15:23:50 +08:00
2025-02-16 15:51:40 +08:00
2023-08-11 13:47:55 +08:00
2024-04-01 19:17:35 +08:00