24 Commits

Author SHA1 Message Date
Trim21 2a0d29c1f5 style: add new rule for imports (#785) 2024-08-13 22:31:39 +00:00
Winter f5f7ba7ff1 server: torrentService: normalize case of hash during torrent lookup 2022-08-14 17:45:01 -07:00
Jesse Chan efdd620192 dependencies: bump (major)
TODO: drop the "const argv = argvObj as Record<string, any>;" hack

Refs: yargs/yargs#2175
2022-05-07 16:41:10 -07:00
Jesse Chan e09accd696 server: drop databases before removing user 2022-05-01 14:55:50 -07:00
Jesse Chan 5f3144416d server: use "dateFinished" for more accurate download completion notification 2021-05-17 21:46:16 +08:00
Jesse Chan 1a878d5423 flood: rearrange, remove misc files and reformat 2020-11-15 23:03:47 +08:00
Jesse Chan ed98e210f4 server: schema validate configurations
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.
2020-11-14 15:20:23 +08:00
Jesse Chan 00029514f7 ClientConnectionInterruption: allow retrying with current settings 2020-11-03 01:31:09 +08:00
Jesse Chan 48220af88b server: services: properly extends destroy function by calling super 2020-11-02 22:42:33 +08:00
Jesse Chan 017b9d159d server: replace explicit binds with arrow functions 2020-11-02 19:32:33 +08:00
Jesse Chan 6e866445ea EXPERIMENTAL: feature: support qBittorrent 2020-10-25 08:27:52 -05:00
Jesse Chan 5f47ddf153 server: torrentService: ensure active interval is applied
Fixes: aa0c7cf3db
2020-10-24 01:14:33 +08:00
Jesse Chan aa0c7cf3db server: add torrentClientPollIntervalIdle to adjust polling when idle
Some automations like notification of download completion rely on
polling of torrent list. Plus, in the future, we might add more
automation capabilities such as "Pause after reaching certain ratio".

As such, don't completely stop polling when idle. Instead, add a config
"torrentClientPollIntervalIdle" to adjust the interval. The default is
(1000 * 60 * 15) ms aka 15 minutes that should allow low resources
consumption and ensure the automations like logging of download completion
time can work within reasonable error margin.

Fixes: 8452d51b79
Bug: #45, Flood-UI/flood#405
2020-10-24 00:53:01 +08:00
Jesse Chan 911b6eecb1 client, server: convert chained null checks to optional chaining 2020-10-21 11:35:04 +08:00
Jesse Chan 8d2959edfc API: activity-stream: migrate all diff actions to JSON Patch 2020-10-20 20:31:08 +08:00
Jesse Chan 1f76f320c5 server: clientGatewayService: define interface 2020-10-17 13:44:06 +08:00
Jesse Chan 3ea6a93904 server: initial tests for torrents endpoints 2020-10-17 13:44:06 +08:00
Jesse Chan a75498b110 server: isolate rTorrent specific functions 2020-10-17 13:24:14 +08:00
Jesse Chan 95cf01f598 server: migrate torrent details functions to TypeScript 2020-10-17 13:24:14 +08:00
Jesse Chan 16465f4239 server: migrate method call configs to immutable arrays 2020-10-07 00:36:11 +08:00
Jesse Chan 8452d51b79 server: torrentService: stop polling when there is no listener
Bug: #45, Flood-UI/flood#405
2020-10-04 18:22:37 +08:00
Jesse Chan 37680fa7a1 dependencies: migrate from deep-equal to fast-equals
The object here and its values are simple. No special data
structure is expected.

Bug: #45, Flood-UI/flood#405
2020-10-04 11:25:13 +08:00
Jesse Chan 69276b5fa4 server: migrate checkHash to clientGatewayService 2020-09-29 12:40:07 +08:00
Jesse Chan 43b2d8fbbf server: services: migrate to TypeScript 2020-09-27 22:27:14 +08:00