@ctrl/qbittorrent 9.5.0 → 9.5.2
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 +7 -5
- package/dist/src/qbittorrent.js +5 -11
- package/package.json +1 -1
@@ -79,19 +79,21 @@ 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,
|
82
|
+
listTorrents({ hashes, filter, category, sort, offset, reverse, tag, limit, isPrivate, includeTrackers, }?: {
|
83
83
|
hashes?: string | string[];
|
84
|
-
torrent_hashes?: string | string[];
|
85
84
|
filter?: TorrentFilters;
|
86
|
-
status_filter?: TorrentFilters;
|
87
85
|
sort?: string;
|
88
86
|
tag?: string;
|
89
87
|
category?: string;
|
90
88
|
offset?: number;
|
91
89
|
limit?: number;
|
92
90
|
reverse?: boolean;
|
93
|
-
|
94
|
-
|
91
|
+
/**
|
92
|
+
* Maps to `private` query parameter.
|
93
|
+
* Renamed to avoid conflict with `private` keyword.
|
94
|
+
*/
|
95
|
+
isPrivate?: boolean;
|
96
|
+
includeTrackers?: boolean;
|
95
97
|
}): Promise<Torrent[]>;
|
96
98
|
getAllData(): Promise<AllClientData>;
|
97
99
|
/**
|
package/dist/src/qbittorrent.js
CHANGED
@@ -139,20 +139,14 @@ 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,
|
142
|
+
async listTorrents({ hashes, filter, category, sort, offset, reverse, tag, limit, isPrivate, includeTrackers, } = {}) {
|
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
|
-
}
|
150
147
|
if (filter) {
|
151
148
|
params.filter = filter;
|
152
149
|
}
|
153
|
-
if (status_filter) {
|
154
|
-
params.status_filter = status_filter;
|
155
|
-
}
|
156
150
|
if (category !== undefined) {
|
157
151
|
params.category = category;
|
158
152
|
}
|
@@ -171,11 +165,11 @@ export class QBittorrent {
|
|
171
165
|
if (reverse) {
|
172
166
|
params.reverse = JSON.stringify(reverse);
|
173
167
|
}
|
174
|
-
if (
|
175
|
-
params.
|
168
|
+
if (isPrivate) {
|
169
|
+
params.private = JSON.stringify(isPrivate);
|
176
170
|
}
|
177
|
-
if (
|
178
|
-
params.
|
171
|
+
if (includeTrackers) {
|
172
|
+
params.includeTrackers = JSON.stringify(includeTrackers);
|
179
173
|
}
|
180
174
|
const res = await this.request('/torrents/info', 'GET', params);
|
181
175
|
return res;
|