* Added comment to torrent details
Mostly simple as it's supported by the various clients,
except in the case of rtorrent.
For rtorrent, tags are stored in custom1, consistent with other clients.
For that reason, comment is being stored in custom2,
which is also consistent with other clients.
In particular, rutorrent uses a prefix on the comment for some reason,
which is duplicated in this change to preserve cross-compatibility.
* Fix lint 'let' and noreferrer
Co-authored-by: FinalDoom <7464170-FinalDoom@users.noreply.gitlab.com>
TRANSFER_SUMMARY_DIFF_CHANGE is almost always full update:
```
[
{"op":"replace","path":"/downTotal","value":851320719382},
{"op":"replace","path":"/downRate","value":6139},
{"op":"replace","path":"/upTotal","value":1826972572184},
{"op":"replace","path":"/upRate","value":5480521}
]
```
which is generally less efficient than full object (TRANSFER_SUMMARY_FULL_UPDATE):
```
{
"upRate":5430724,
"upTotal":1827320521117,
"downRate":6062,
"downTotal":851321106383
}
```
Unfortunately there are still many people who prefer static config
file. As such, schema validate the configurations to ensure that
the failure happens loud and early when the config.js is broken.
Also enforces that the length of secret must be larger than 30 as
the JWT secret can be brute forced locally without interaction with
the server.
This ensures that we always have proper configurations and avoids
unnecessary and bad defensive programming practices.
Those endpoints use extensive amount of user-provided properties
and will be frequently used by third party developers. With Node
15, unhandled promise rejections directly crash the server, as
such, it is safer to schema validate the request before processing
it.
This change also prepares the code paths for later change that adds
destination fallbacks.