@ctrl/qbittorrent 9.5.1 → 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.
@@ -79,11 +79,9 @@ 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;
|
@@ -95,7 +93,7 @@ export declare class QBittorrent implements TorrentClient {
|
|
95
93
|
* Renamed to avoid conflict with `private` keyword.
|
96
94
|
*/
|
97
95
|
isPrivate?: boolean;
|
98
|
-
|
96
|
+
includeTrackers?: boolean;
|
99
97
|
}): Promise<Torrent[]>;
|
100
98
|
getAllData(): Promise<AllClientData>;
|
101
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
|
}
|
@@ -174,8 +168,8 @@ export class QBittorrent {
|
|
174
168
|
if (isPrivate) {
|
175
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;
|