@ctrl/qbittorrent 5.1.0 → 5.2.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.
- package/dist/src/qbittorrent.js +3 -2
- package/dist/src/types.d.ts +3 -3
- package/package.json +9 -9
package/dist/src/qbittorrent.js
CHANGED
@@ -110,10 +110,10 @@ export class QBittorrent {
|
|
110
110
|
if (filter) {
|
111
111
|
params.filter = filter;
|
112
112
|
}
|
113
|
-
if (category) {
|
113
|
+
if (category !== undefined) {
|
114
114
|
params.category = category;
|
115
115
|
}
|
116
|
-
if (tag) {
|
116
|
+
if (tag !== undefined) {
|
117
117
|
params.tag = tag;
|
118
118
|
}
|
119
119
|
if (offset !== undefined) {
|
@@ -568,6 +568,7 @@ export class QBittorrent {
|
|
568
568
|
// allow proxy agent
|
569
569
|
...(this.config.agent ? { agent: this.config.agent } : {}),
|
570
570
|
});
|
571
|
+
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
571
572
|
if (!res.headers['set-cookie'] || !res.headers['set-cookie'].length) {
|
572
573
|
throw new Error('Cookie not found. Auth Failed.');
|
573
574
|
}
|
package/dist/src/types.d.ts
CHANGED
@@ -20,7 +20,7 @@ export interface BuildInfo {
|
|
20
20
|
*/
|
21
21
|
bitness: string;
|
22
22
|
}
|
23
|
-
export
|
23
|
+
export type TorrentFilters = 'all' | 'downloading' | 'completed' | 'paused' | 'active' | 'inactive' | 'resumed' | 'stalled' | 'stalled_uploading' | 'stalled_downloading';
|
24
24
|
export interface Torrent {
|
25
25
|
/**
|
26
26
|
* Torrent name
|
@@ -175,7 +175,7 @@ export interface Torrent {
|
|
175
175
|
*/
|
176
176
|
tags: string;
|
177
177
|
}
|
178
|
-
export
|
178
|
+
export type TorrentCategories = Record<string, Category>;
|
179
179
|
interface Category {
|
180
180
|
name: string;
|
181
181
|
savePath: string;
|
@@ -521,7 +521,7 @@ export declare enum TorrentPieceState {
|
|
521
521
|
*/
|
522
522
|
Downloaded = 2
|
523
523
|
}
|
524
|
-
|
524
|
+
type TrueFalseStr = 'true' | 'false';
|
525
525
|
export interface AddTorrentOptions {
|
526
526
|
/**
|
527
527
|
* not totally sure what its for but its required
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ctrl/qbittorrent",
|
3
|
-
"version": "5.
|
3
|
+
"version": "5.2.0",
|
4
4
|
"description": "TypeScript api wrapper for qbittorrent using got",
|
5
5
|
"author": "Scott Cooper <scttcper@gmail.com>",
|
6
6
|
"license": "MIT",
|
@@ -32,24 +32,24 @@
|
|
32
32
|
},
|
33
33
|
"dependencies": {
|
34
34
|
"@ctrl/magnet-link": "^3.1.1",
|
35
|
-
"@ctrl/shared-torrent": "^4.3.
|
35
|
+
"@ctrl/shared-torrent": "^4.3.2",
|
36
36
|
"@ctrl/torrent-file": "^2.0.2",
|
37
37
|
"@ctrl/url-join": "^2.0.2",
|
38
38
|
"formdata-node": "^5.0.0",
|
39
|
-
"got": "^12.5.
|
39
|
+
"got": "^12.5.3",
|
40
40
|
"tough-cookie": "^4.1.2"
|
41
41
|
},
|
42
42
|
"devDependencies": {
|
43
|
-
"@ctrl/eslint-config": "3.5.
|
43
|
+
"@ctrl/eslint-config": "3.5.7",
|
44
44
|
"@sindresorhus/tsconfig": "3.0.1",
|
45
|
-
"@types/node": "18.
|
45
|
+
"@types/node": "18.11.13",
|
46
46
|
"@types/tough-cookie": "4.0.2",
|
47
|
-
"@vitest/coverage-c8": "0.
|
47
|
+
"@vitest/coverage-c8": "0.25.7",
|
48
48
|
"c8": "7.12.0",
|
49
49
|
"p-wait-for": "5.0.0",
|
50
|
-
"typedoc": "0.23.
|
51
|
-
"typescript": "4.
|
52
|
-
"vitest": "0.
|
50
|
+
"typedoc": "0.23.21",
|
51
|
+
"typescript": "4.9.4",
|
52
|
+
"vitest": "0.25.7"
|
53
53
|
},
|
54
54
|
"release": {
|
55
55
|
"branches": [
|