cross-seed 6.13.6 → 7.0.0-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.
Files changed (147) hide show
  1. package/README.md +12 -13
  2. package/dist/webui/assets/FieldInfo-Bxj_j8SJ.js +1 -0
  3. package/dist/webui/assets/Page-C3rteCZt.js +1 -0
  4. package/dist/webui/assets/array-field-DVSC6nHP.js +1 -0
  5. package/dist/webui/assets/badge-DTZMtS0e.js +1 -0
  6. package/dist/webui/assets/check-Bu3ldi63.js +1 -0
  7. package/dist/webui/assets/chevron-down-CRy8M0kJ.js +1 -0
  8. package/dist/webui/assets/clients-CW8oEZoQ.js +1 -0
  9. package/dist/webui/assets/connect-YBNsnjWT.js +1 -0
  10. package/dist/webui/assets/debug-mz8-WYZj.js +1 -0
  11. package/dist/webui/assets/directories-BSK28RgR.js +1 -0
  12. package/dist/webui/assets/duration-field-C6xoSlJg.js +1 -0
  13. package/dist/webui/assets/general-lJJxZhH7.js +1 -0
  14. package/dist/webui/assets/health-CXbsVrie.js +1 -0
  15. package/dist/webui/assets/index-Bi48hI2z.js +54 -0
  16. package/dist/webui/assets/index-C-Ul7GNg.css +1 -0
  17. package/dist/webui/assets/index-C2cH1Gst.js +1 -0
  18. package/dist/webui/assets/index-Cc5bDmJr.js +1 -0
  19. package/dist/webui/assets/jobs-CxmNab9w.js +1 -0
  20. package/dist/webui/assets/library-vaj2W8sE.js +1 -0
  21. package/dist/webui/assets/loader-circle-M0gu1gZ-.js +1 -0
  22. package/dist/webui/assets/logs-Cu9RyKS0.js +1 -0
  23. package/dist/webui/assets/search-2R5sIdT8.js +1 -0
  24. package/dist/webui/assets/select-field-BCqNLDrJ.js +1 -0
  25. package/dist/webui/assets/select-zHgqMzLj.js +1 -0
  26. package/dist/webui/assets/settings-CMYjpTbZ.js +1 -0
  27. package/dist/webui/assets/submit-button-BtcnyggQ.js +1 -0
  28. package/dist/webui/assets/switch-G0W3uJVN.js +1 -0
  29. package/dist/webui/assets/switch-field-IBd9ORNq.js +1 -0
  30. package/dist/webui/assets/table-DvgJU7Gh.js +1 -0
  31. package/dist/webui/assets/test-tube-BIwmoM45.js +1 -0
  32. package/dist/webui/assets/text-field-DruSbGhy.js +1 -0
  33. package/dist/webui/assets/time-BSMZjmyW.js +1 -0
  34. package/dist/webui/assets/trackers-D-OpAe63.js +7 -0
  35. package/dist/webui/assets/use-form-validation-context-BkAfWAh0.js +1 -0
  36. package/dist/webui/assets/use-settings-form-submit-CDRh-E9U.js +2 -0
  37. package/dist/webui/assets/useQuery-A4Hv_4uX.js +1 -0
  38. package/dist/webui/index.html +13 -0
  39. package/node_modules/@cross-seed/shared/dist/configSchema.d.ts +261 -0
  40. package/node_modules/@cross-seed/shared/dist/configSchema.d.ts.map +1 -0
  41. package/node_modules/@cross-seed/shared/dist/configSchema.js +53 -0
  42. package/node_modules/@cross-seed/shared/dist/configSchema.js.map +1 -0
  43. package/node_modules/@cross-seed/shared/dist/constants.d.ts +122 -0
  44. package/node_modules/@cross-seed/shared/dist/constants.d.ts.map +1 -0
  45. package/node_modules/@cross-seed/shared/dist/constants.js +127 -0
  46. package/node_modules/@cross-seed/shared/dist/constants.js.map +1 -0
  47. package/node_modules/@cross-seed/shared/dist/tsconfig.tsbuildinfo +1 -0
  48. package/node_modules/@cross-seed/shared/dist/utils.d.ts +6 -0
  49. package/node_modules/@cross-seed/shared/dist/utils.d.ts.map +1 -0
  50. package/node_modules/@cross-seed/shared/dist/utils.js +9 -0
  51. package/node_modules/@cross-seed/shared/dist/utils.js.map +1 -0
  52. package/node_modules/@cross-seed/shared/package.json +22 -0
  53. package/package.json +35 -11
  54. package/dist/Result.js +0 -64
  55. package/dist/Result.js.map +0 -1
  56. package/dist/action.js +0 -693
  57. package/dist/action.js.map +0 -1
  58. package/dist/arr.js +0 -199
  59. package/dist/arr.js.map +0 -1
  60. package/dist/auth.js +0 -25
  61. package/dist/auth.js.map +0 -1
  62. package/dist/clients/Deluge.js +0 -698
  63. package/dist/clients/Deluge.js.map +0 -1
  64. package/dist/clients/QBittorrent.js +0 -785
  65. package/dist/clients/QBittorrent.js.map +0 -1
  66. package/dist/clients/RTorrent.js +0 -654
  67. package/dist/clients/RTorrent.js.map +0 -1
  68. package/dist/clients/TorrentClient.js +0 -272
  69. package/dist/clients/TorrentClient.js.map +0 -1
  70. package/dist/clients/Transmission.js +0 -404
  71. package/dist/clients/Transmission.js.map +0 -1
  72. package/dist/cmd.js +0 -196
  73. package/dist/cmd.js.map +0 -1
  74. package/dist/config.template.cjs +0 -353
  75. package/dist/config.template.cjs.map +0 -1
  76. package/dist/configSchema.js +0 -667
  77. package/dist/configSchema.js.map +0 -1
  78. package/dist/configuration.js +0 -82
  79. package/dist/configuration.js.map +0 -1
  80. package/dist/constants.js +0 -281
  81. package/dist/constants.js.map +0 -1
  82. package/dist/dataFiles.js +0 -208
  83. package/dist/dataFiles.js.map +0 -1
  84. package/dist/db.js +0 -216
  85. package/dist/db.js.map +0 -1
  86. package/dist/decide.js +0 -553
  87. package/dist/decide.js.map +0 -1
  88. package/dist/diff.js +0 -24
  89. package/dist/diff.js.map +0 -1
  90. package/dist/errors.js +0 -16
  91. package/dist/errors.js.map +0 -1
  92. package/dist/indexers.js +0 -180
  93. package/dist/indexers.js.map +0 -1
  94. package/dist/inject.js +0 -594
  95. package/dist/inject.js.map +0 -1
  96. package/dist/jobs.js +0 -146
  97. package/dist/jobs.js.map +0 -1
  98. package/dist/logger.js +0 -143
  99. package/dist/logger.js.map +0 -1
  100. package/dist/migrations/00-initialSchema.js +0 -30
  101. package/dist/migrations/00-initialSchema.js.map +0 -1
  102. package/dist/migrations/01-jobs.js +0 -12
  103. package/dist/migrations/01-jobs.js.map +0 -1
  104. package/dist/migrations/02-timestamps.js +0 -21
  105. package/dist/migrations/02-timestamps.js.map +0 -1
  106. package/dist/migrations/03-rateLimits.js +0 -14
  107. package/dist/migrations/03-rateLimits.js.map +0 -1
  108. package/dist/migrations/04-auth.js +0 -13
  109. package/dist/migrations/04-auth.js.map +0 -1
  110. package/dist/migrations/05-caps.js +0 -16
  111. package/dist/migrations/05-caps.js.map +0 -1
  112. package/dist/migrations/06-uniqueDecisions.js +0 -29
  113. package/dist/migrations/06-uniqueDecisions.js.map +0 -1
  114. package/dist/migrations/07-limits.js +0 -12
  115. package/dist/migrations/07-limits.js.map +0 -1
  116. package/dist/migrations/08-rss.js +0 -15
  117. package/dist/migrations/08-rss.js.map +0 -1
  118. package/dist/migrations/09-clientAndDataSearchees.js +0 -34
  119. package/dist/migrations/09-clientAndDataSearchees.js.map +0 -1
  120. package/dist/migrations/10-indexerNameAudioBookCaps.js +0 -18
  121. package/dist/migrations/10-indexerNameAudioBookCaps.js.map +0 -1
  122. package/dist/migrations/11-trackers.js +0 -38
  123. package/dist/migrations/11-trackers.js.map +0 -1
  124. package/dist/migrations/migrations.js +0 -31
  125. package/dist/migrations/migrations.js.map +0 -1
  126. package/dist/parseTorrent.js +0 -128
  127. package/dist/parseTorrent.js.map +0 -1
  128. package/dist/pipeline.js +0 -527
  129. package/dist/pipeline.js.map +0 -1
  130. package/dist/preFilter.js +0 -250
  131. package/dist/preFilter.js.map +0 -1
  132. package/dist/pushNotifier.js +0 -137
  133. package/dist/pushNotifier.js.map +0 -1
  134. package/dist/runtimeConfig.js +0 -11
  135. package/dist/runtimeConfig.js.map +0 -1
  136. package/dist/searchee.js +0 -658
  137. package/dist/searchee.js.map +0 -1
  138. package/dist/server.js +0 -456
  139. package/dist/server.js.map +0 -1
  140. package/dist/startup.js +0 -203
  141. package/dist/startup.js.map +0 -1
  142. package/dist/torrent.js +0 -637
  143. package/dist/torrent.js.map +0 -1
  144. package/dist/torznab.js +0 -786
  145. package/dist/torznab.js.map +0 -1
  146. package/dist/utils.js +0 -637
  147. package/dist/utils.js.map +0 -1
@@ -1,404 +0,0 @@
1
- import { readdir } from "fs/promises";
2
- import ms from "ms";
3
- import { basename } from "path";
4
- import { inspect } from "util";
5
- import { InjectionResult, TORRENT_TAG, USER_AGENT, } from "../constants.js";
6
- import { db } from "../db.js";
7
- import { CrossSeedError } from "../errors.js";
8
- import { Label, logger } from "../logger.js";
9
- import { resultOf, resultOfErr } from "../Result.js";
10
- import { getRuntimeConfig } from "../runtimeConfig.js";
11
- import { createSearcheeFromDB, parseTitle, updateSearcheeClientDB, } from "../searchee.js";
12
- import { extractCredentialsFromUrl, humanReadableSize, sanitizeInfoHash, wait, } from "../utils.js";
13
- import { shouldResumeFromNonRelevantFiles, clientSearcheeModified, getMaxRemainingBytes, getResumeStopTime, organizeTrackers, resumeErrSleepTime, resumeSleepTime, shouldRecheck, } from "./TorrentClient.js";
14
- const XTransmissionSessionId = "X-Transmission-Session-Id";
15
- function doesAlreadyExist(args) {
16
- return "torrent-duplicate" in args;
17
- }
18
- export default class Transmission {
19
- xTransmissionSessionId;
20
- url;
21
- clientHost;
22
- clientPriority;
23
- clientType = Label.TRANSMISSION;
24
- readonly;
25
- label;
26
- constructor(url, clientHost, priority, readonly) {
27
- this.url = url;
28
- this.clientHost = clientHost;
29
- this.clientPriority = priority;
30
- this.readonly = readonly;
31
- this.label = `${this.clientType}@${this.clientHost}`;
32
- }
33
- async request(method, args = {}, retries = 1, timeout = 0) {
34
- const msg = `Calling method ${method} with params ${inspect(args, { depth: null, compact: true })}`;
35
- const message = msg.length > 1000 ? `${msg.slice(0, 1000)}...` : msg;
36
- logger.verbose({ label: this.label, message });
37
- const { username, password, href } = extractCredentialsFromUrl(this.url).unwrapOrThrow(new CrossSeedError(`[${this.label}] Transmission rpc url must be percent-encoded`));
38
- const headers = new Headers({ "User-Agent": USER_AGENT });
39
- headers.set("Content-Type", "application/json");
40
- if (this.xTransmissionSessionId) {
41
- headers.set(XTransmissionSessionId, this.xTransmissionSessionId);
42
- }
43
- if (username && password) {
44
- const credentials = Buffer.from(`${username}:${password}`).toString("base64");
45
- headers.set("Authorization", `Basic ${credentials}`);
46
- }
47
- const response = await fetch(href, {
48
- method: "POST",
49
- body: JSON.stringify({ method, arguments: args }),
50
- headers,
51
- signal: AbortSignal.timeout(timeout || ms("5 minutes")),
52
- });
53
- if (response.status === 409) {
54
- this.xTransmissionSessionId = response.headers.get(XTransmissionSessionId);
55
- return this.request(method, args, retries - 1);
56
- }
57
- try {
58
- const responseBody = (await response.clone().json());
59
- if (responseBody.result === "success" ||
60
- responseBody.result === "duplicate torrent" // slight hack but best solution for now
61
- ) {
62
- return responseBody.arguments;
63
- }
64
- else {
65
- throw new Error(`Transmission responded with error: "${responseBody.result}"`);
66
- }
67
- }
68
- catch (e) {
69
- if (e instanceof SyntaxError) {
70
- logger.error({
71
- label: this.label,
72
- message: `Transmission returned non-JSON response`,
73
- });
74
- logger.debug({
75
- label: this.label,
76
- message: response.clone().text(),
77
- });
78
- }
79
- else {
80
- logger.error({
81
- label: this.label,
82
- message: `Transmission responded with an error: ${e.message}`,
83
- });
84
- logger.debug(e);
85
- }
86
- throw e;
87
- }
88
- }
89
- async validateConfig() {
90
- const { torrentDir } = getRuntimeConfig();
91
- try {
92
- await this.request("session-get", {}, 1, ms("10 seconds"));
93
- }
94
- catch (e) {
95
- throw new CrossSeedError(`[${this.label}] Failed to reach Transmission at ${this.clientHost}: ${e.message}`);
96
- }
97
- logger.info({
98
- label: this.label,
99
- message: `Logged in successfully${this.readonly ? " (readonly)" : ""}`,
100
- });
101
- if (!torrentDir)
102
- return;
103
- if (!(await readdir(torrentDir)).some((f) => f.endsWith(".torrent"))) {
104
- throw new CrossSeedError(`[${this.label}] Invalid torrentDir, if no torrents are in client set to null for now: https://www.cross-seed.org/docs/basics/options#torrentdir`);
105
- }
106
- }
107
- async checkOriginalTorrent(data, onlyCompleted) {
108
- let queryResponse;
109
- try {
110
- queryResponse = await this.request("torrent-get", {
111
- fields: ["downloadDir", "percentDone"],
112
- ids: [data.infoHash],
113
- });
114
- }
115
- catch (e) {
116
- return resultOfErr(InjectionResult.FAILURE);
117
- }
118
- if (queryResponse.torrents.length === 0) {
119
- return resultOfErr(InjectionResult.FAILURE);
120
- }
121
- const [{ downloadDir, percentDone }] = queryResponse.torrents;
122
- if (onlyCompleted && percentDone < 1) {
123
- return resultOfErr(InjectionResult.TORRENT_NOT_COMPLETE);
124
- }
125
- return resultOf({ downloadDir });
126
- }
127
- async getDownloadDir(meta, options) {
128
- const result = await this.checkOriginalTorrent(meta, options.onlyCompleted);
129
- return result
130
- .mapOk((r) => r.downloadDir)
131
- .mapErr((err) => (err === "FAILURE" ? "UNKNOWN_ERROR" : err));
132
- }
133
- async getAllDownloadDirs(options) {
134
- let torrents = (await this.request("torrent-get", {
135
- fields: ["hashString", "downloadDir", "percentDone"],
136
- })).torrents;
137
- if (options.onlyCompleted) {
138
- torrents = torrents.filter((torrent) => torrent.percentDone === 1);
139
- }
140
- return torrents.reduce((acc, { hashString, downloadDir }) => {
141
- acc.set(hashString, downloadDir);
142
- return acc;
143
- }, new Map());
144
- }
145
- async isTorrentInClient(inputHash) {
146
- const infoHash = inputHash.toLowerCase();
147
- try {
148
- const torrents = (await this.request("torrent-get", {
149
- fields: ["hashString"],
150
- })).torrents;
151
- if (!torrents.length)
152
- throw new Error("No torrents found");
153
- for (const torrent of torrents) {
154
- if (torrent.hashString.toLowerCase() === infoHash) {
155
- return resultOf(true);
156
- }
157
- }
158
- return resultOf(false);
159
- }
160
- catch (e) {
161
- return resultOfErr(e);
162
- }
163
- }
164
- async isTorrentComplete(infoHash) {
165
- const queryResponse = await this.request("torrent-get", {
166
- fields: ["percentDone"],
167
- ids: [infoHash],
168
- });
169
- if (queryResponse.torrents.length === 0) {
170
- return resultOfErr("NOT_FOUND");
171
- }
172
- const [{ percentDone }] = queryResponse.torrents;
173
- return resultOf(percentDone === 1);
174
- }
175
- async isTorrentChecking(infoHash) {
176
- const queryResponse = await this.request("torrent-get", {
177
- fields: ["status"],
178
- ids: [infoHash],
179
- });
180
- if (queryResponse.torrents.length === 0) {
181
- return resultOfErr("NOT_FOUND");
182
- }
183
- const [{ status }] = queryResponse.torrents;
184
- return resultOf([1, 2].includes(status));
185
- }
186
- async getAllTorrents() {
187
- const res = await this.request("torrent-get", {
188
- fields: ["hashString", "labels"],
189
- });
190
- return res.torrents.map((torrent) => ({
191
- infoHash: torrent.hashString,
192
- tags: torrent.labels,
193
- }));
194
- }
195
- async getClientSearchees(options) {
196
- const searchees = [];
197
- const newSearchees = [];
198
- const infoHashes = new Set();
199
- let torrents;
200
- try {
201
- torrents = (await this.request("torrent-get", {
202
- fields: [
203
- "hashString",
204
- "name",
205
- "files",
206
- "totalSize",
207
- "downloadDir",
208
- "labels",
209
- "trackers",
210
- ],
211
- })).torrents;
212
- }
213
- catch (e) {
214
- logger.error({
215
- label: this.label,
216
- message: `Failed to get torrents from client: ${e.message}`,
217
- });
218
- logger.debug(e);
219
- return { searchees, newSearchees };
220
- }
221
- if (!torrents.length) {
222
- logger.error({
223
- label: this.label,
224
- message: "No torrents found in client",
225
- });
226
- return { searchees, newSearchees };
227
- }
228
- for (const torrent of torrents) {
229
- const infoHash = torrent.hashString.toLowerCase();
230
- infoHashes.add(infoHash);
231
- const dbTorrent = await db("client_searchee")
232
- .where("info_hash", infoHash)
233
- .where("client_host", this.clientHost)
234
- .first();
235
- const { name } = torrent;
236
- const savePath = torrent.downloadDir;
237
- const tags = torrent.labels;
238
- const modified = clientSearcheeModified(this.label, dbTorrent, name, savePath, {
239
- tags,
240
- });
241
- const refresh = options?.refresh === undefined
242
- ? false
243
- : options.refresh.length === 0
244
- ? true
245
- : options.refresh.includes(infoHash);
246
- if (!modified && !refresh) {
247
- if (!options?.newSearcheesOnly) {
248
- searchees.push(createSearcheeFromDB(dbTorrent));
249
- }
250
- continue;
251
- }
252
- const files = torrent.files.map((file) => ({
253
- name: basename(file.name),
254
- path: file.name,
255
- length: file.length,
256
- }));
257
- if (!files.length) {
258
- logger.verbose({
259
- label: this.label,
260
- message: `No files found for ${torrent.name} [${sanitizeInfoHash(infoHash)}]: skipping`,
261
- });
262
- continue;
263
- }
264
- const trackers = organizeTrackers(torrent.trackers.map((tracker) => ({
265
- url: tracker.announce,
266
- tier: tracker.tier,
267
- })));
268
- const title = parseTitle(name, files) ?? name;
269
- const length = torrent.totalSize;
270
- const searchee = {
271
- infoHash,
272
- name,
273
- title,
274
- files,
275
- length,
276
- clientHost: this.clientHost,
277
- savePath,
278
- tags,
279
- trackers,
280
- };
281
- newSearchees.push(searchee);
282
- searchees.push(searchee);
283
- }
284
- await updateSearcheeClientDB(this.clientHost, newSearchees, infoHashes);
285
- return { searchees, newSearchees };
286
- }
287
- async recheckTorrent(infoHash) {
288
- // Pause first as it may resume after recheck automatically
289
- await this.request("torrent-stop", {
290
- ids: [infoHash],
291
- });
292
- await this.request("torrent-verify", {
293
- ids: [infoHash],
294
- });
295
- }
296
- async resumeInjection(meta, decision, options) {
297
- const infoHash = meta.infoHash;
298
- let sleepTime = resumeSleepTime;
299
- const stopTime = getResumeStopTime();
300
- let stop = false;
301
- while (Date.now() < stopTime) {
302
- if (options.checkOnce) {
303
- if (stop)
304
- return;
305
- stop = true;
306
- }
307
- await wait(sleepTime);
308
- const queryResponse = await this.request("torrent-get", {
309
- fields: ["leftUntilDone", "name", "status"],
310
- ids: [infoHash],
311
- });
312
- if (queryResponse.torrents.length === 0) {
313
- sleepTime = resumeErrSleepTime; // Dropping connections or restart
314
- continue;
315
- }
316
- const [{ leftUntilDone, name, status }] = queryResponse.torrents;
317
- if ([1, 2].includes(status)) {
318
- continue;
319
- }
320
- const torrentLog = `${name} [${sanitizeInfoHash(infoHash)}]`;
321
- if (status !== 0) {
322
- logger.warn({
323
- label: this.label,
324
- message: `Will not resume ${torrentLog}: status is ${status}`,
325
- });
326
- return;
327
- }
328
- const maxRemainingBytes = getMaxRemainingBytes(meta, decision, {
329
- torrentLog,
330
- label: this.label,
331
- });
332
- if (leftUntilDone > maxRemainingBytes) {
333
- if (!shouldResumeFromNonRelevantFiles(meta, leftUntilDone, decision, {
334
- torrentLog,
335
- label: this.label,
336
- })) {
337
- logger.warn({
338
- label: this.label,
339
- message: `autoResumeMaxDownload will not resume ${torrentLog}: remainingSize ${humanReadableSize(leftUntilDone, { binary: true })} > ${humanReadableSize(maxRemainingBytes, { binary: true })} limit`,
340
- });
341
- return;
342
- }
343
- }
344
- logger.info({
345
- label: this.label,
346
- message: `Resuming ${torrentLog}: ${humanReadableSize(leftUntilDone, { binary: true })} remaining`,
347
- });
348
- await this.request("torrent-start", {
349
- ids: [infoHash],
350
- });
351
- return;
352
- }
353
- logger.warn({
354
- label: this.label,
355
- message: `Will not resume torrent ${infoHash}: timeout`,
356
- });
357
- }
358
- async inject(newTorrent, searchee, decision, options) {
359
- const existsRes = await this.isTorrentInClient(newTorrent.infoHash);
360
- if (existsRes.isErr())
361
- return InjectionResult.FAILURE;
362
- if (existsRes.unwrap())
363
- return InjectionResult.ALREADY_EXISTS;
364
- let destinationDir;
365
- if (options.destinationDir) {
366
- destinationDir = options.destinationDir;
367
- }
368
- else {
369
- const result = await this.getDownloadDir(searchee, { onlyCompleted: options.onlyCompleted });
370
- if (result.isOk()) {
371
- destinationDir = result.unwrap();
372
- }
373
- else {
374
- if (result.unwrapErr() === "TORRENT_NOT_COMPLETE") {
375
- return InjectionResult.TORRENT_NOT_COMPLETE;
376
- }
377
- return InjectionResult.FAILURE;
378
- }
379
- }
380
- let addResponse;
381
- try {
382
- const toRecheck = shouldRecheck(newTorrent, decision);
383
- addResponse = await this.request("torrent-add", {
384
- "download-dir": destinationDir,
385
- metainfo: newTorrent.encode().toString("base64"),
386
- paused: toRecheck,
387
- labels: [TORRENT_TAG],
388
- });
389
- if (toRecheck) {
390
- void this.resumeInjection(newTorrent, decision, {
391
- checkOnce: false,
392
- });
393
- }
394
- }
395
- catch (e) {
396
- return InjectionResult.FAILURE;
397
- }
398
- if (doesAlreadyExist(addResponse)) {
399
- return InjectionResult.ALREADY_EXISTS;
400
- }
401
- return InjectionResult.SUCCESS;
402
- }
403
- }
404
- //# sourceMappingURL=Transmission.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Transmission.js","source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F,IAAI,SAAS,EAAE,CAAC;gBACf,KAAK,IAAI,CAAC,eAAe,CAAC,UAAU,EAAE,QAAQ,EAAE;oBAC/C,SAAS,EAAE,KAAK;iBAChB,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACZ,OAAO,eAAe,CAAC,OAAO,CAAC;QAChC,CAAC;QAED,IAAI,gBAAgB,CAAC,WAAW,CAAC,EAAE,CAAC;YACnC,OAAO,eAAe,CAAC,cAAc,CAAC;QACvC,CAAC;QAED,OAAO,eAAe,CAAC,OAAO,CAAC;IAChC,CAAC;CACD"}
package/dist/cmd.js DELETED
@@ -1,196 +0,0 @@
1
- #!/usr/bin/env node
2
- import chalk from "chalk";
3
- import { Option, program } from "commander";
4
- import { getApiKey, resetApiKey } from "./auth.js";
5
- import { generateConfig, getFileConfig } from "./configuration.js";
6
- import { Action, LinkType, MatchMode, PROGRAM_NAME, PROGRAM_VERSION, } from "./constants.js";
7
- import { db } from "./db.js";
8
- import { updateTorrentCache } from "./decide.js";
9
- import { diffCmd } from "./diff.js";
10
- import { CrossSeedError } from "./errors.js";
11
- import { clearIndexerFailures } from "./indexers.js";
12
- import { injectSavedTorrents, restoreFromTorrentCache } from "./inject.js";
13
- import { jobsLoop } from "./jobs.js";
14
- import { bulkSearch, scanRssFeeds } from "./pipeline.js";
15
- import { sendTestNotification } from "./pushNotifier.js";
16
- import { serve } from "./server.js";
17
- import { withFullRuntime, withMinimalRuntime } from "./startup.js";
18
- import { indexTorrentsAndDataDirs, parseTorrentFromPath } from "./torrent.js";
19
- import { fallback } from "./utils.js";
20
- let fileConfig;
21
- try {
22
- fileConfig = await getFileConfig();
23
- }
24
- catch (e) {
25
- if (e instanceof CrossSeedError) {
26
- console.error(e.message);
27
- process.exit(1);
28
- }
29
- throw e;
30
- }
31
- const apiKeyOption = new Option("--api-key <key>", "Provide your own API key to override the autogenerated one.").default(fileConfig.apiKey);
32
- function createCommandWithSharedOptions(name, description) {
33
- return program
34
- .command(name)
35
- .description(description)
36
- .option("-T, --torznab <urls...>", "Torznab urls with apikey included (separated by spaces)",
37
- // @ts-expect-error commander supports non-string defaults
38
- fallback(fileConfig.torznab))
39
- .option("--use-client-torrents", "Use torrents from your client for matching", fallback(fileConfig.useClientTorrents, false))
40
- .option("--no-use-client-torrents", "Don't use torrents from your client for matching")
41
- .option("--ignore-non-relevant-files-to-resume", "Ignore certain known irrelevant files when calculating resume size", fallback(fileConfig.ignoreNonRelevantFilesToResume, false))
42
- .option("--no-ignore-non-relevant-files-to-resume", "Don't ignore certain known irrelevant files when calculating resume size")
43
- .option("--data-dirs <dirs...>", "Directories to use if searching by data instead of torrents (separated by spaces)",
44
- // @ts-expect-error commander supports non-string defaults
45
- fallback(fileConfig.dataDirs))
46
- .addOption(new Option("--match-mode <mode>", `"strict" will require all file names to match exactly. "flexible" allows for file renames. "partial" is like "flexible" but it ignores small files like .nfo/.srt if missing.`)
47
- .default(fallback(fileConfig.matchMode, MatchMode.STRICT))
48
- .choices(Object.values(MatchMode))
49
- .makeOptionMandatory())
50
- .option("--skip-recheck", "Skip rechecking torrents before resuming, unless necessary.", fallback(fileConfig.skipRecheck, true))
51
- .option("--no-skip-recheck", "Recheck every torrent before resuming, even if unnecessary.")
52
- .option("--auto-resume-max-download <number>", "The maximum size in bytes remaining for a torrent to be resumed", parseInt, fallback(fileConfig.autoResumeMaxDownload, 52428800))
53
- .option("--link-category <cat>", "Torrent client category to set on linked torrents", fallback(fileConfig.linkCategory, "cross-seed-link"))
54
- .option("--link-dir <dir>", "Directory to link the data for matches to", fileConfig.linkDir)
55
- .option("--link-dirs <dirs...>", "Directories to link the data for matches to",
56
- // @ts-expect-error commander supports non-string defaults
57
- fallback(fileConfig.linkDirs))
58
- .option("--flat-linking", "Use flat linking directory structure (without individual tracker folders)", fallback(fileConfig.flatLinking, false))
59
- .addOption(new Option("--link-type <type>", "Use links of this type to inject data-based matches into your client")
60
- .default(fallback(fileConfig.linkType, LinkType.SYMLINK))
61
- .choices(Object.values(LinkType))
62
- .makeOptionMandatory())
63
- .option("--max-data-depth <depth>", "Max depth to look for searchees in dataDirs", (n) => parseInt(n), fallback(fileConfig.maxDataDepth, 2))
64
- .option("-i, --torrent-dir <dir>", "Directory with torrent files", fileConfig.torrentDir)
65
- .option("-s, --output-dir <dir>", "Directory to save results in", fileConfig.outputDir)
66
- .option("--include-non-videos", "Include torrents which contain non-video files", fallback(fileConfig.includeNonVideos, false))
67
- .option("--no-include-non-videos", "Don't include torrents which contain non-videos")
68
- .option("--include-single-episodes", "Include single episode torrents in the search", fallback(fileConfig.includeSingleEpisodes, false))
69
- .option("--no-include-single-episodes", "Don't include single episode torrents in the search")
70
- .option("--season-from-episodes <decimal>", "Match season packs from episode torrents", parseFloat, fallback(fileConfig.seasonFromEpisodes, null))
71
- .option("--no-season-from-episodes", "Don't match season packs from episode torrents")
72
- .option("--fuzzy-size-threshold <decimal>", "The size difference allowed to be considered a match.", parseFloat, fallback(fileConfig.fuzzySizeThreshold, 0.02))
73
- .option("-x, --exclude-older <cutoff>", "Exclude torrents first seen more than n minutes ago. Bypasses the -a flag.", fileConfig.excludeOlder)
74
- .option("-r, --exclude-recent-search <cutoff>", "Exclude torrents which have been searched more recently than n minutes ago. Bypasses the -a flag.", fileConfig.excludeRecentSearch)
75
- .option("-v, --verbose", "Log verbose output", false)
76
- .addOption(new Option("-A, --action <action>", "If set to 'inject', cross-seed will attempt to add the found torrents to your torrent client.")
77
- .default(fallback(fileConfig.action, Action.SAVE))
78
- .choices(Object.values(Action)))
79
- .option("--torrent-clients <clients...>", "The the client prefix, readonly status, and urls of your torrent clients.",
80
- // @ts-expect-error commander supports non-string defaults
81
- fallback(fileConfig.torrentClients, []))
82
- .option("--rtorrent-rpc-url <url>", "The url of your rtorrent XMLRPC interface.", fileConfig.rtorrentRpcUrl)
83
- .option("--qbittorrent-url <url>", "The url of your qBittorrent webui.", fileConfig.qbittorrentUrl)
84
- .option("--transmission-rpc-url <url>", "The url of your Transmission RPC interface.", fileConfig.transmissionRpcUrl)
85
- .option("--deluge-rpc-url <url>", "The url of your Deluge JSON-RPC interface.", fileConfig.delugeRpcUrl)
86
- .option("--duplicate-categories", "Create and inject using categories with the same save paths as your normal categories", fallback(fileConfig.duplicateCategories, false))
87
- .option("--notification-webhook-urls <urls...>", "cross-seed will send POST requests to these urls with a JSON payload of { title, body, extra }",
88
- // @ts-expect-error commander supports non-string defaults
89
- fileConfig.notificationWebhookUrls)
90
- .option("--notification-webhook-url <url>", "cross-seed will send POST requests to this url with a JSON payload of { title, body, extra }", fileConfig.notificationWebhookUrl)
91
- .option("-d, --delay <delay>", "Pause duration (seconds) between searches", parseFloat, fallback(fileConfig.delay, 30))
92
- .option("--snatch-timeout <timeout>", "Timeout for unresponsive snatches", fallback(fileConfig.snatchTimeout, "30 seconds"))
93
- .option("--search-timeout <timeout>", "Timeout for unresponsive searches", fallback(fileConfig.searchTimeout, "2 minutes"))
94
- .option("--search-limit <number>", "The number of searches before stops", (n) => parseInt(n), fallback(fileConfig.searchLimit, 0))
95
- .option("--block-list <strings...>", "The infohashes and/or strings in torrent name to block from cross-seed",
96
- // @ts-expect-error commander supports non-string defaults
97
- fallback(fileConfig.blockList, []))
98
- .option("--sonarr <urls...>", "Sonarr API URL(s)",
99
- // @ts-expect-error commander supports non-string defaults
100
- fileConfig.sonarr)
101
- .option("--radarr <urls...>", "Radarr API URL(s)",
102
- // @ts-expect-error commander supports non-string defaults
103
- fileConfig.radarr);
104
- }
105
- program.name(PROGRAM_NAME);
106
- program.description(chalk.yellow.bold(`${PROGRAM_NAME} v${PROGRAM_VERSION}`));
107
- program.version(PROGRAM_VERSION, "-V, --version", "output the current version");
108
- program
109
- .command("gen-config")
110
- .description("Generate a config file")
111
- .action(withMinimalRuntime(generateConfig));
112
- program
113
- .command("update-torrent-cache-trackers")
114
- .description("Update announce urls in the torrent cache")
115
- .usage("<old-announce-url> <new-announce-url>")
116
- .argument("old-announce-url", 'A substring of the announce url to replace, e.g. update-torrent-cache-trackers "old.example.com" "new.example.com"')
117
- .argument("new-announce-url", 'A substring of the new announce url to replace the old one with, e.g. update-torrent-cache-trackers "myoldpasskey" "mynewpasskey"')
118
- .action(withMinimalRuntime(updateTorrentCache));
119
- program
120
- .command("diff")
121
- .description("Analyze two torrent files for cross-seed compatibility")
122
- .argument("searchee")
123
- .argument("candidate")
124
- .action(withMinimalRuntime(diffCmd, { migrate: false }));
125
- program
126
- .command("tree")
127
- .description("Print a torrent's file tree")
128
- .argument("torrent")
129
- .action(withMinimalRuntime(async (torrentPath) => {
130
- console.log("Use `cross-seed diff` to compare two .torrent files");
131
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
132
- const { category, isSingleFileTorrent, raw, tags, ...meta } = await parseTorrentFromPath(torrentPath);
133
- console.log(meta);
134
- }, { migrate: false }));
135
- program
136
- .command("clear-indexer-failures")
137
- .description("Clear the cached details of indexers (failures and caps)")
138
- .action(withMinimalRuntime(clearIndexerFailures));
139
- program
140
- .command("clear-cache")
141
- .description("Clear the cache without causing torrents to be re-snatched and reset the timestamps for excludeOlder and excludeRecentSearch")
142
- .action(withMinimalRuntime(async () => {
143
- console.log("Clearing cache...");
144
- await db("decision").whereNull("info_hash").del();
145
- await db("timestamp").del();
146
- }));
147
- program
148
- .command("clear-client-cache")
149
- .description("Clear cross-seed's cache of your client's torrents. Only necessary if you have recently changed clients or modified the torrents in client and don't want to wait on the cleanup job.")
150
- .action(withMinimalRuntime(async () => {
151
- console.log("Clearing client cache...");
152
- await db("torrent").del();
153
- await db("client_searchee").del();
154
- await db("data").del();
155
- await db("ensemble").del();
156
- }));
157
- program
158
- .command("api-key")
159
- .description("Show the api key")
160
- .addOption(apiKeyOption)
161
- .action(withMinimalRuntime(getApiKey));
162
- program
163
- .command("reset-api-key")
164
- .description("Reset the api key")
165
- .action(withMinimalRuntime(resetApiKey));
166
- createCommandWithSharedOptions("daemon", "Start the cross-seed daemon")
167
- .option("-p, --port <port>", "Listen on a custom port", (n) => parseInt(n), fallback(fileConfig.port, 2468))
168
- .option("--host <host>", "Bind to a specific IP address", fileConfig.host)
169
- .option("--no-port", "Do not listen on any port")
170
- .option("--search-cadence <cadence>", "Run searches on a schedule. Format: https://github.com/vercel/ms", fileConfig.searchCadence)
171
- .option("--rss-cadence <cadence>", "Run an rss scan on a schedule. Format: https://github.com/vercel/ms", fileConfig.rssCadence)
172
- .addOption(apiKeyOption)
173
- .action(withFullRuntime(async (options) => {
174
- await indexTorrentsAndDataDirs({ startup: true });
175
- // technically this will never resolve, but it's necessary to keep the process running
176
- await Promise.all([serve(options.port, options.host), jobsLoop()]);
177
- }));
178
- createCommandWithSharedOptions("rss", "Run an rss scan").action(withFullRuntime(async () => {
179
- await indexTorrentsAndDataDirs({ startup: true });
180
- await scanRssFeeds();
181
- }));
182
- createCommandWithSharedOptions("search", "Search for cross-seeds")
183
- .addOption(new Option("--torrents <torrents...>", "torrent files separated by spaces").hideHelp())
184
- .option("--no-exclude-older", "Don't Exclude torrents based on when they were first seen.")
185
- .option("--no-exclude-recent-search", "Don't Exclude torrents based on when they were last searched.")
186
- .action(withFullRuntime(() => bulkSearch()));
187
- createCommandWithSharedOptions("inject", "Inject saved cross-seeds into your client (without filtering, see docs)")
188
- .option("--inject-dir <dir>", "Directory of torrent files to try to inject", fallback(fileConfig.injectDir, fileConfig.outputDir))
189
- .option("--ignore-titles", "Searchee and candidate titles do not need to pass the fuzzy matching check (useful if `cross-seed inject` erroneously rejects by title)", fallback(fileConfig.ignoreTitles, false))
190
- .option("--no-ignore-titles", "Searchee and candidate titles need to pass the fuzzy matching check (default)")
191
- .action(withFullRuntime(injectSavedTorrents));
192
- createCommandWithSharedOptions("restore", "Use snatched torrents from torrent_cache to attempt to restore cross seeds. Will need to run `cross-seed inject` afterwards with dataDirs configured.").action(withFullRuntime(restoreFromTorrentCache));
193
- createCommandWithSharedOptions("test-notification", "Send a test notification").action(withFullRuntime(sendTestNotification));
194
- program.showHelpAfterError("(add --help for additional information)");
195
- await program.parseAsync();
196
- //# sourceMappingURL=cmd.js.map
package/dist/cmd.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"cmd.js","sourceRoot":"","sources":["../src/cmd.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAc,cAAc,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EACN,MAAM,EACN,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,eAAe,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,IAAI,UAAsB,CAAC;AAC3B,IAAI,CAAC;IACJ,UAAU,GAAG,MAAM,aA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