@ctrl/qbittorrent 9.4.0 → 9.5.1
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.d.ts +10 -1
- package/dist/src/qbittorrent.js +16 -1
- package/dist/src/types.d.ts +1 -1
- package/package.json +10 -10
@@ -79,14 +79,23 @@ export declare class QBittorrent implements TorrentClient {
|
|
79
79
|
* @param category Get torrents with the given category (empty string means "without category"; no "category" parameter means "any category")
|
80
80
|
* @returns list of torrents
|
81
81
|
*/
|
82
|
-
listTorrents({ hashes, filter, category, sort, offset, reverse, tag, }?: {
|
82
|
+
listTorrents({ hashes, torrent_hashes, filter, status_filter, category, sort, offset, reverse, tag, limit, isPrivate, include_trackers, }?: {
|
83
83
|
hashes?: string | string[];
|
84
|
+
torrent_hashes?: string | string[];
|
84
85
|
filter?: TorrentFilters;
|
86
|
+
status_filter?: TorrentFilters;
|
85
87
|
sort?: string;
|
86
88
|
tag?: string;
|
87
89
|
category?: string;
|
88
90
|
offset?: number;
|
91
|
+
limit?: number;
|
89
92
|
reverse?: boolean;
|
93
|
+
/**
|
94
|
+
* Maps to `private` query parameter.
|
95
|
+
* Renamed to avoid conflict with `private` keyword.
|
96
|
+
*/
|
97
|
+
isPrivate?: boolean;
|
98
|
+
include_trackers?: boolean;
|
90
99
|
}): Promise<Torrent[]>;
|
91
100
|
getAllData(): Promise<AllClientData>;
|
92
101
|
/**
|
package/dist/src/qbittorrent.js
CHANGED
@@ -139,14 +139,20 @@ export class QBittorrent {
|
|
139
139
|
* @param category Get torrents with the given category (empty string means "without category"; no "category" parameter means "any category")
|
140
140
|
* @returns list of torrents
|
141
141
|
*/
|
142
|
-
async listTorrents({ hashes, filter, category, sort, offset, reverse, tag, } = {}) {
|
142
|
+
async listTorrents({ hashes, torrent_hashes, filter, status_filter, category, sort, offset, reverse, tag, limit, isPrivate, include_trackers, } = {}) {
|
143
143
|
const params = {};
|
144
144
|
if (hashes) {
|
145
145
|
params.hashes = normalizeHashes(hashes);
|
146
146
|
}
|
147
|
+
if (torrent_hashes) {
|
148
|
+
params.torrent_hashes = normalizeHashes(torrent_hashes);
|
149
|
+
}
|
147
150
|
if (filter) {
|
148
151
|
params.filter = filter;
|
149
152
|
}
|
153
|
+
if (status_filter) {
|
154
|
+
params.status_filter = status_filter;
|
155
|
+
}
|
150
156
|
if (category !== undefined) {
|
151
157
|
params.category = category;
|
152
158
|
}
|
@@ -156,12 +162,21 @@ export class QBittorrent {
|
|
156
162
|
if (offset !== undefined) {
|
157
163
|
params.offset = `${offset}`;
|
158
164
|
}
|
165
|
+
if (limit !== undefined) {
|
166
|
+
params.limit = `${limit}`;
|
167
|
+
}
|
159
168
|
if (sort) {
|
160
169
|
params.sort = sort;
|
161
170
|
}
|
162
171
|
if (reverse) {
|
163
172
|
params.reverse = JSON.stringify(reverse);
|
164
173
|
}
|
174
|
+
if (isPrivate) {
|
175
|
+
params.private = JSON.stringify(isPrivate);
|
176
|
+
}
|
177
|
+
if (include_trackers) {
|
178
|
+
params.include_trackers = JSON.stringify(include_trackers);
|
179
|
+
}
|
165
180
|
const res = await this.request('/torrents/info', 'GET', params);
|
166
181
|
return res;
|
167
182
|
}
|
package/dist/src/types.d.ts
CHANGED
@@ -20,7 +20,7 @@ export interface BuildInfo {
|
|
20
20
|
*/
|
21
21
|
bitness: string;
|
22
22
|
}
|
23
|
-
export type TorrentFilters = 'all' | 'downloading' | 'completed' | 'paused' | 'active' | 'inactive' | 'resumed' | 'stalled' | 'stalled_uploading' | 'stalled_downloading';
|
23
|
+
export type TorrentFilters = 'all' | 'downloading' | 'seeding' | 'completed' | 'paused' | 'stopped' | 'active' | 'inactive' | 'resumed' | 'running' | 'stalled' | 'stalled_uploading' | 'stalled_downloading' | 'checking' | 'moving' | 'errored';
|
24
24
|
export interface Torrent {
|
25
25
|
/**
|
26
26
|
* Torrent name
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ctrl/qbittorrent",
|
3
|
-
"version": "9.
|
3
|
+
"version": "9.5.1",
|
4
4
|
"description": "TypeScript api wrapper for qbittorrent using got",
|
5
5
|
"author": "Scott Cooper <scttcper@gmail.com>",
|
6
6
|
"license": "MIT",
|
@@ -42,23 +42,23 @@
|
|
42
42
|
"cookie": "^1.0.2",
|
43
43
|
"node-fetch-native": "^1.6.6",
|
44
44
|
"ofetch": "^1.4.1",
|
45
|
-
"type-fest": "^4.
|
45
|
+
"type-fest": "^4.39.1",
|
46
46
|
"ufo": "^1.5.4",
|
47
47
|
"uint8array-extras": "^1.4.0"
|
48
48
|
},
|
49
49
|
"devDependencies": {
|
50
50
|
"@biomejs/biome": "1.9.4",
|
51
|
-
"@ctrl/eslint-config-biome": "4.3.
|
52
|
-
"@eslint/compat": "^1.2.
|
51
|
+
"@ctrl/eslint-config-biome": "4.3.4",
|
52
|
+
"@eslint/compat": "^1.2.8",
|
53
53
|
"@sindresorhus/tsconfig": "7.0.0",
|
54
54
|
"@types/cookie": "1.0.0",
|
55
|
-
"@types/node": "22.
|
56
|
-
"@vitest/coverage-v8": "3.
|
57
|
-
"eslint": "^9.
|
55
|
+
"@types/node": "22.14.0",
|
56
|
+
"@vitest/coverage-v8": "3.1.1",
|
57
|
+
"eslint": "^9.23.0",
|
58
58
|
"p-wait-for": "5.0.2",
|
59
|
-
"typedoc": "0.
|
60
|
-
"typescript": "5.
|
61
|
-
"vitest": "3.
|
59
|
+
"typedoc": "0.28.1",
|
60
|
+
"typescript": "5.8.2",
|
61
|
+
"vitest": "3.1.1"
|
62
62
|
},
|
63
63
|
"release": {
|
64
64
|
"branches": [
|