@ctrl/qbittorrent 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/src/types.d.ts +214 -26
  2. package/package.json +10 -9
@@ -1,22 +1,22 @@
1
1
  export interface BuildInfo {
2
2
  /**
3
- * QT version
3
+ * QT version
4
4
  */
5
5
  qt: string;
6
6
  /**
7
- * libtorrent version
7
+ * libtorrent version
8
8
  */
9
9
  libtorrent: string;
10
10
  /**
11
- * Boost version
11
+ * Boost version
12
12
  */
13
13
  boost: string;
14
14
  /**
15
- * OpenSSL version
15
+ * OpenSSL version
16
16
  */
17
17
  openssl: string;
18
18
  /**
19
- * Application bitness (e.g. 64-bit)
19
+ * Application bitness (e.g. 64-bit)
20
20
  */
21
21
  bitness: string;
22
22
  }
@@ -549,6 +549,14 @@ export interface AddTorrentOptions {
549
549
  * Set torrent download speed limit. Unit in bytes/second
550
550
  */
551
551
  dlLimit: number;
552
+ /**
553
+ * Set torrent share ratio limit
554
+ */
555
+ ratioLimit: number;
556
+ /**
557
+ * Set torrent seeding time limit. Unit in seconds
558
+ */
559
+ seedingTimeLimit: number;
552
560
  /**
553
561
  * Whether Automatic Torrent Management should be used, disables use of savepath
554
562
  */
@@ -660,9 +668,13 @@ export interface Preferences {
660
668
  */
661
669
  temp_path: string;
662
670
  /**
663
- * Property: directory to watch for torrent files, value: where torrents loaded from this directory should be downloaded to (see list of possible values below). Slashes are used as path separators; multiple key/value pairs can be specified
671
+ * Directory to watch for torrent files, value: where torrents loaded from this directory should be downloaded to (see list of possible values below). Slashes are used as path separators; multiple key/value pairs can be specified
672
+ * Possible values of scan_dirs:
673
+ * 0 Download to the monitored folder
674
+ * 1 Download to the default save path
675
+ * "/path/to/download/to" Download to this path
664
676
  */
665
- scan_dirs: Record<string, unknown>;
677
+ scan_dirs: Record<string, 0 | 1 | string>;
666
678
  /**
667
679
  * Path to directory to copy .torrent files to. Slashes are used as path separators
668
680
  */
@@ -798,11 +810,14 @@ export interface Preferences {
798
810
  /**
799
811
  * True if the advanced libtorrent option piece_extent_affinity is enabled
800
812
  */
801
- piece_extent_affinity: boolean;
813
+ enable_piece_extent_affinity: boolean;
802
814
  /**
803
- * True if uTP protocol should be enabled; this option is only available in qBittorent built against libtorrent version 0.16.X and higher
815
+ * Bittorrent Protocol to use
816
+ * 0 TCP and μTP
817
+ * 1 TCP
818
+ * 2 μTP
804
819
  */
805
- enable_utp: boolean;
820
+ bittorrent_protocol: 0 | 1 | 2;
806
821
  /**
807
822
  * True if [du]l_limit should be applied to uTP connections; this option is only available in qBittorent built against libtorrent version 0.16.X and higher
808
823
  */
@@ -845,20 +860,22 @@ export interface Preferences {
845
860
  schedule_to_min: number;
846
861
  /**
847
862
  * Scheduler days. See possible values here below
848
- */
849
- scheduler_days: number;
863
+ * 0 Every day
864
+ * 1 Every weekday
865
+ * 2 Every weekend
866
+ * 3 Every Monday
867
+ * 4 Every Tuesday
868
+ * 5 Every Wednesday
869
+ * 6 Every Thursday
870
+ * 7 Every Friday
871
+ * 8 Every Saturday
872
+ * 9 Every Sunday
873
+ */
874
+ scheduler_days: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
850
875
  /**
851
876
  * True if DHT is enabled
852
877
  */
853
878
  dht: boolean;
854
- /**
855
- * True if DHT port should match TCP port
856
- */
857
- dhtSameAsBT: boolean;
858
- /**
859
- * DHT port if dhtSameAsBT is false
860
- */
861
- dht_port: number;
862
879
  /**
863
880
  * True if PeX is enabled
864
881
  */
@@ -869,10 +886,13 @@ export interface Preferences {
869
886
  lsd: boolean;
870
887
  /**
871
888
  * See list of possible values here below
889
+ * 0 Prefer encryption
890
+ * 1 Force encryption on
891
+ * 2 Force encryption off
872
892
  */
873
- encryption: number;
893
+ encryption: 0 | 1 | 2;
874
894
  /**
875
- * If true anonymous mode will be enabled; read more [here](Anonymous-Mode); this option is only available in qBittorent built against libtorrent version 0.16.X and higher
895
+ * If true anonymous mode will be enabled; read more [here](https://github.com/qbittorrent/qBittorrent/wiki/Anonymous-Mode); this option is only available in qBittorent built against libtorrent version 0.16.X and higher
876
896
  */
877
897
  anonymous_mode: boolean;
878
898
  /**
@@ -891,10 +911,6 @@ export interface Preferences {
891
911
  * True if peer and web seed connections should be proxified; this option will have any effect only in qBittorent built against libtorrent version 0.16.X and higher
892
912
  */
893
913
  proxy_peer_connections: boolean;
894
- /**
895
- * True if the connections not supported by the proxy are disabled
896
- */
897
- force_proxy: boolean;
898
914
  /**
899
915
  * True proxy requires authentication; doesn't apply to SOCKS4 proxies
900
916
  */
@@ -907,6 +923,10 @@ export interface Preferences {
907
923
  * Password for proxy authentication
908
924
  */
909
925
  proxy_password: string;
926
+ /**
927
+ * True if proxy is only used for torrents
928
+ */
929
+ proxy_torrents_only: boolean;
910
930
  /**
911
931
  * True if external IP filter should be enabled
912
932
  */
@@ -963,6 +983,14 @@ export interface Preferences {
963
983
  * WebUI access ban duration in seconds
964
984
  */
965
985
  web_ui_ban_duration: number;
986
+ /**
987
+ * Seconds until WebUI is automatically signed off
988
+ */
989
+ web_ui_session_timeout: number;
990
+ /**
991
+ * True if WebUI host header validation is enabled
992
+ */
993
+ web_ui_host_header_validation_enabled: boolean;
966
994
  /**
967
995
  * True if authentication challenge for loopback address (127.0.0.1) should be disabled
968
996
  */
@@ -995,6 +1023,14 @@ export interface Preferences {
995
1023
  * SSL certificate contents (this is a not a path)
996
1024
  */
997
1025
  ssl_cert: string;
1026
+ /**
1027
+ * For API ≥ v2.0.1: Path to SSL keyfile
1028
+ */
1029
+ web_ui_https_key_path: string;
1030
+ /**
1031
+ * For API ≥ v2.0.1: Path to SSL certificate
1032
+ */
1033
+ web_ui_https_cert_path: string;
998
1034
  /**
999
1035
  * True if server DNS should be updated dynamically
1000
1036
  */
@@ -1031,5 +1067,157 @@ export interface Preferences {
1031
1067
  * Enable auto-downloading of torrents from the RSS feeds
1032
1068
  */
1033
1069
  rss_auto_downloading_enabled: boolean;
1070
+ /**
1071
+ * For API ≥ v2.5.1: Enable downloading of repack/proper Episodes
1072
+ */
1073
+ rss_download_repack_proper_episodes: boolean;
1074
+ /**
1075
+ * For API ≥ v2.5.1: List of RSS Smart Episode Filters
1076
+ */
1077
+ rss_smart_episode_filters: string;
1078
+ /**
1079
+ * Enable automatic adding of trackers to new torrents
1080
+ */
1081
+ add_trackers_enabled: boolean;
1082
+ /**
1083
+ * List of trackers to add to new torrent
1084
+ */
1085
+ add_trackers: string;
1086
+ /**
1087
+ * For API ≥ v2.5.1: Enable custom http headers
1088
+ */
1089
+ web_ui_use_custom_http_headers_enabled: boolean;
1090
+ /**
1091
+ * For API ≥ v2.5.1: List of custom http headers
1092
+ */
1093
+ web_ui_custom_http_headers: string;
1094
+ /**
1095
+ * True enables max seeding time
1096
+ */
1097
+ max_seeding_time_enabled: boolean;
1098
+ /**
1099
+ * Number of minutes to seed a torrent
1100
+ */
1101
+ max_seeding_time: number;
1102
+ /**
1103
+ * TODO
1104
+ */
1105
+ announce_ip: string;
1106
+ /**
1107
+ * True always announce to all tiers
1108
+ */
1109
+ announce_to_all_tiers: boolean;
1110
+ /**
1111
+ * True always announce to all trackers in a tier
1112
+ */
1113
+ announce_to_all_trackers: boolean;
1114
+ /**
1115
+ * Number of asynchronous I/O threads
1116
+ */
1117
+ async_io_threads: number;
1118
+ /**
1119
+ * List of banned IPs
1120
+ */
1121
+ banned_IPs: string;
1122
+ /**
1123
+ * Outstanding memory when checking torrents in MiB
1124
+ */
1125
+ checking_memory_use: number;
1126
+ /**
1127
+ * IP Address to bind to. Empty String means All addresses
1128
+ */
1129
+ current_interface_address: string;
1130
+ /**
1131
+ * Network Interface used
1132
+ */
1133
+ current_network_interface: string;
1134
+ /**
1135
+ * Disk cache used in MiB
1136
+ */
1137
+ disk_cache: number;
1138
+ /**
1139
+ * Disk cache expiry interval in seconds
1140
+ */
1141
+ disk_cache_ttl: number;
1142
+ /**
1143
+ * Port used for embedded tracker
1144
+ */
1145
+ embedded_tracker_port: number;
1146
+ /**
1147
+ * True enables coalesce reads & writes
1148
+ */
1149
+ enable_coalesce_read_write: boolean;
1150
+ /**
1151
+ * True enables embedded tracker
1152
+ */
1153
+ enable_embedded_tracker: boolean;
1154
+ /**
1155
+ * True allows multiple connections from the same IP address
1156
+ */
1157
+ enable_multi_connections_from_same_ip: boolean;
1158
+ /**
1159
+ * True enables os cache
1160
+ */
1161
+ enable_os_cache: boolean;
1162
+ /**
1163
+ * True enables sending of upload piece suggestions
1164
+ */
1165
+ enable_upload_suggestions: boolean;
1166
+ /**
1167
+ * File pool size
1168
+ */
1169
+ file_pool_size: number;
1170
+ /**
1171
+ * Maximal outgoing port (0: Disabled)
1172
+ */
1173
+ outgoing_ports_max: number;
1174
+ /**
1175
+ * Minimal outgoing port (0: Disabled)
1176
+ */
1177
+ outgoing_ports_min: number;
1178
+ /**
1179
+ * True rechecks torrents on completion
1180
+ */
1181
+ recheck_completed_torrents: boolean;
1182
+ /**
1183
+ * True resolves peer countries
1184
+ */
1185
+ resolve_peer_countries: boolean;
1186
+ /**
1187
+ * Save resume data interval in min
1188
+ */
1189
+ save_resume_data_interval: number;
1190
+ /**
1191
+ * Send buffer low watermark in KiB
1192
+ */
1193
+ send_buffer_low_watermark: number;
1194
+ /**
1195
+ * Send buffer watermark in KiB
1196
+ */
1197
+ send_buffer_watermark: number;
1198
+ /**
1199
+ * Send buffer watermark factor in percent
1200
+ */
1201
+ send_buffer_watermark_factor: number;
1202
+ /**
1203
+ * Socket backlog size
1204
+ */
1205
+ socket_backlog_size: number;
1206
+ /**
1207
+ * Upload choking algorithm used (see list of possible values below)
1208
+ */
1209
+ upload_choking_algorithm: number;
1210
+ /**
1211
+ * Upload slots behavior used (see list of possible values below)
1212
+ */
1213
+ upload_slots_behavior: number;
1214
+ /**
1215
+ * UPnP lease duration (0: Permanent lease)
1216
+ */
1217
+ upnp_lease_duration: number;
1218
+ /**
1219
+ * μTP-TCP mixed mode algorithm (see list of possible values below)
1220
+ */
1221
+ utp_tcp_mixed_mode: number;
1034
1222
  }
1035
1223
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctrl/qbittorrent",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "TypeScript api wrapper for qbittorrent using got",
5
5
  "author": "Scott Cooper <scttcper@gmail.com>",
6
6
  "license": "MIT",
@@ -28,7 +28,7 @@
28
28
  "build:docs": "typedoc",
29
29
  "test": "ava",
30
30
  "test:watch": "ava --watch",
31
- "test:ci": "c8 --reporter=text --reporter=lcov ava"
31
+ "test:ci": "c8 --reporter=text --reporter=lcov ava --tap | tap-junit -o junit -n test-result.xml"
32
32
  },
33
33
  "dependencies": {
34
34
  "@ctrl/magnet-link": "^3.1.0",
@@ -36,20 +36,21 @@
36
36
  "@ctrl/torrent-file": "^2.0.1",
37
37
  "@ctrl/url-join": "^2.0.0",
38
38
  "formdata-node": "^4.3.2",
39
- "got": "^12.0.1",
39
+ "got": "^12.0.3",
40
40
  "tough-cookie": "^4.0.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@ctrl/eslint-config": "3.3.1",
43
+ "@ctrl/eslint-config": "3.4.1",
44
44
  "@sindresorhus/tsconfig": "2.0.0",
45
- "@types/node": "17.0.21",
45
+ "@types/node": "17.0.23",
46
46
  "@types/tough-cookie": "4.0.1",
47
- "ava": "4.0.1",
47
+ "ava": "4.2.0",
48
48
  "c8": "7.11.0",
49
49
  "p-wait-for": "4.1.0",
50
- "ts-node": "10.5.0",
51
- "typedoc": "0.22.12",
52
- "typescript": "4.5.5"
50
+ "tap-junit": "5.0.2",
51
+ "ts-node": "10.7.0",
52
+ "typedoc": "0.22.15",
53
+ "typescript": "4.6.3"
53
54
  },
54
55
  "ava": {
55
56
  "files": [