cross-seed 5.9.0 → 5.9.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/clients/Deluge.js +64 -36
- package/dist/clients/Deluge.js.map +1 -1
- package/package.json +1 -1
package/dist/clients/Deluge.js
CHANGED
@@ -47,7 +47,7 @@ export default class Deluge {
|
|
47
47
|
logger.warn("Deluge WebUI disconnected from daemon...attempting to reconnect.");
|
48
48
|
const webuiHostList = await this.call("web.get_hosts", [], 0);
|
49
49
|
const connectResponse = await this.call("web.connect", [webuiHostList.result[0][0]], 0);
|
50
|
-
if (connectResponse) {
|
50
|
+
if (!connectResponse.error) {
|
51
51
|
logger.info("Deluge WebUI connected to the daemon.");
|
52
52
|
}
|
53
53
|
else {
|
@@ -65,14 +65,16 @@ export default class Deluge {
|
|
65
65
|
if (this.delugeCookie)
|
66
66
|
headers.set("Cookie", this.delugeCookie);
|
67
67
|
let response, json;
|
68
|
+
const id = Math.floor(Math.random() * 0x7fffffff);
|
68
69
|
try {
|
69
70
|
response = await fetch(href, {
|
70
71
|
body: JSON.stringify({
|
71
|
-
|
72
|
-
|
72
|
+
method,
|
73
|
+
params,
|
74
|
+
id,
|
73
75
|
}),
|
74
76
|
method: "POST",
|
75
|
-
headers
|
77
|
+
headers,
|
76
78
|
});
|
77
79
|
}
|
78
80
|
catch (networkError) {
|
@@ -87,7 +89,7 @@ export default class Deluge {
|
|
87
89
|
catch (jsonParseError) {
|
88
90
|
throw new Error(`Deluge method ${method} response was non-JSON ${jsonParseError}`);
|
89
91
|
}
|
90
|
-
if (json
|
92
|
+
if (json.error?.code === DelugeErrorCode.NO_AUTH && retries > 0) {
|
91
93
|
this.delugeCookie = null;
|
92
94
|
await this.authenticate();
|
93
95
|
if (this.delugeCookie) {
|
@@ -113,8 +115,10 @@ export default class Deluge {
|
|
113
115
|
* returns true if successful.
|
114
116
|
*/
|
115
117
|
async labelEnabled() {
|
116
|
-
const
|
117
|
-
return
|
118
|
+
const enabledPlugins = await this.call("core.get_enabled_plugins", []);
|
119
|
+
return enabledPlugins.error
|
120
|
+
? false
|
121
|
+
: enabledPlugins.result.includes("Label");
|
118
122
|
}
|
119
123
|
/**
|
120
124
|
* if Label plugin is loaded, adds (if necessary)
|
@@ -126,7 +130,7 @@ export default class Deluge {
|
|
126
130
|
infoHash,
|
127
131
|
label,
|
128
132
|
]);
|
129
|
-
if (setResult
|
133
|
+
if (setResult.error?.code === DelugeErrorCode.RPC_FAIL) {
|
130
134
|
await this.call("label.add", [label]);
|
131
135
|
await this.call("label.set_torrent", [infoHash, label]);
|
132
136
|
}
|
@@ -142,17 +146,19 @@ export default class Deluge {
|
|
142
146
|
if (searchee.infoHash) {
|
143
147
|
torrentInfo = await this.getTorrentInfo(searchee);
|
144
148
|
if (!torrentInfo.complete) {
|
145
|
-
if (torrentInfo.save_path == "missing" &&
|
146
|
-
!path &&
|
147
|
-
!searchee.path) {
|
148
|
-
return InjectionResult.FAILURE;
|
149
|
-
}
|
150
149
|
return InjectionResult.TORRENT_NOT_COMPLETE;
|
151
150
|
}
|
152
151
|
}
|
152
|
+
if (!path && (!searchee.infoHash || !torrentInfo)) {
|
153
|
+
logger.debug({
|
154
|
+
label: Label.DELUGE,
|
155
|
+
message: `Injection failure: ${newTorrent.name} was missing critical data.`,
|
156
|
+
});
|
157
|
+
return InjectionResult.FAILURE;
|
158
|
+
}
|
153
159
|
const params = this.formatData(`${newTorrent.getFileSystemSafeName()}.cross-seed.torrent`, newTorrent.encode().toString("base64"), path ? path : torrentInfo.save_path, !!searchee.infoHash);
|
154
160
|
const addResult = await this.call("core.add_torrent_file", params);
|
155
|
-
if (addResult
|
161
|
+
if (addResult.result) {
|
156
162
|
const { dataCategory } = getRuntimeConfig();
|
157
163
|
await this.setLabel(newTorrent.infoHash, searchee.path
|
158
164
|
? dataCategory
|
@@ -165,24 +171,40 @@ export default class Deluge {
|
|
165
171
|
: this.delugeLabel);
|
166
172
|
return InjectionResult.SUCCESS;
|
167
173
|
}
|
168
|
-
else if (addResult
|
174
|
+
else if (addResult.error.message.includes("already")) {
|
169
175
|
return InjectionResult.ALREADY_EXISTS;
|
170
176
|
}
|
171
|
-
else if (addResult
|
177
|
+
else if (addResult.error.message) {
|
172
178
|
logger.debug({
|
173
179
|
label: Label.DELUGE,
|
174
180
|
message: `Injection failed: ${addResult.error.message}`,
|
175
181
|
});
|
176
182
|
return InjectionResult.FAILURE;
|
177
183
|
}
|
184
|
+
else {
|
185
|
+
logger.debug({
|
186
|
+
label: Label.DELUGE,
|
187
|
+
message: `Unknown injection failure: ${newTorrent.name} (${newTorrent.infoHash})`,
|
188
|
+
});
|
189
|
+
return InjectionResult.FAILURE;
|
190
|
+
}
|
178
191
|
}
|
179
192
|
catch (injectResult) {
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
193
|
+
if (injectResult.includes("label.set_torrent")) {
|
194
|
+
logger.warning({
|
195
|
+
label: Label.DELUGE,
|
196
|
+
message: `Labeling failure: ${newTorrent.name} (${newTorrent.infoHash})`,
|
197
|
+
});
|
198
|
+
return InjectionResult.SUCCESS;
|
199
|
+
}
|
200
|
+
else {
|
201
|
+
logger.error({
|
202
|
+
label: Label.DELUGE,
|
203
|
+
message: `Injection failed: ${injectResult}`,
|
204
|
+
});
|
205
|
+
logger.debug(injectResult);
|
206
|
+
return InjectionResult.FAILURE;
|
207
|
+
}
|
186
208
|
}
|
187
209
|
}
|
188
210
|
/**
|
@@ -203,29 +225,32 @@ export default class Deluge {
|
|
203
225
|
* returns information needed to complete/validate injection
|
204
226
|
*/
|
205
227
|
async getTorrentInfo(searchee) {
|
228
|
+
if (!searchee.infoHash) {
|
229
|
+
throw new Error("Can't search a torrent without a infoHash");
|
230
|
+
}
|
231
|
+
let torrent;
|
206
232
|
try {
|
207
|
-
let torrentLabel = undefined;
|
208
233
|
const params = [
|
209
234
|
["state", "progress", "save_path", "label"],
|
210
235
|
{ hash: searchee.infoHash },
|
211
236
|
];
|
212
237
|
const response = await this.call("web.update_ui", params);
|
213
|
-
if (response
|
214
|
-
|
238
|
+
if (response.result.torrents) {
|
239
|
+
torrent = response.result.torrents?.[searchee.infoHash];
|
215
240
|
}
|
216
|
-
|
217
|
-
response
|
218
|
-
?.length != 0) {
|
219
|
-
torrentLabel =
|
220
|
-
response?.result?.torrents?.[searchee.infoHash]?.label;
|
241
|
+
else {
|
242
|
+
throw new Error("Client returned unexpected response (object missing)");
|
221
243
|
}
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
244
|
+
if (torrent === undefined) {
|
245
|
+
throw new Error(`Torrent not found in client (${searchee.infoHash})`);
|
246
|
+
}
|
247
|
+
const completedTorrent = torrent.state === "Seeding" || torrent.progress === 100;
|
248
|
+
const torrentLabel = this.isLabelEnabled && torrent.label.length != 0
|
249
|
+
? torrent.label
|
250
|
+
: undefined;
|
226
251
|
return {
|
227
252
|
complete: completedTorrent,
|
228
|
-
save_path:
|
253
|
+
save_path: torrent.save_path,
|
229
254
|
label: torrentLabel,
|
230
255
|
};
|
231
256
|
}
|
@@ -235,7 +260,10 @@ export default class Deluge {
|
|
235
260
|
message: `Failed to fetch torrent data: ${searchee.name} - (${searchee.infoHash})`,
|
236
261
|
});
|
237
262
|
logger.debug(e);
|
238
|
-
|
263
|
+
// @ts-expect-error needs es2022 target (tsconfig)
|
264
|
+
throw new Error("web.update_ui: failed to fetch data from client", {
|
265
|
+
cause: e,
|
266
|
+
});
|
239
267
|
}
|
240
268
|
}
|
241
269
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Deluge.js","sourceRoot":"","sources":["../../src/clients/Deluge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,gBA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