cross-seed 3.4.2 → 4.0.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/README.md +14 -93
- package/dist/action.js +48 -0
- package/dist/action.js.map +1 -0
- package/dist/cache.js +13 -0
- package/dist/cache.js.map +1 -0
- package/dist/cmd.js +34 -23
- package/dist/cmd.js.map +1 -1
- package/dist/config.template.cjs +38 -21
- package/dist/config.template.cjs.map +1 -1
- package/dist/config.template.docker.cjs +41 -23
- package/dist/config.template.docker.cjs.map +1 -1
- package/dist/configuration.js.map +1 -1
- package/dist/constants.js +4 -0
- package/dist/constants.js.map +1 -1
- package/dist/db.js +11 -28
- package/dist/db.js.map +1 -1
- package/dist/decide.js +37 -21
- package/dist/decide.js.map +1 -1
- package/dist/errors.js +8 -0
- package/dist/errors.js.map +1 -1
- package/dist/jobs.js +73 -0
- package/dist/jobs.js.map +1 -0
- package/dist/logger.js +6 -2
- package/dist/logger.js.map +1 -1
- package/dist/migrations/00-initialSchema.js +75 -0
- package/dist/migrations/00-initialSchema.js.map +1 -0
- package/dist/migrations/01-jobs.js +17 -0
- package/dist/migrations/01-jobs.js.map +1 -0
- package/dist/migrations/migrations.js +9 -0
- package/dist/migrations/migrations.js.map +1 -0
- package/dist/pipeline.js +76 -95
- package/dist/pipeline.js.map +1 -1
- package/dist/preFilter.js +20 -18
- package/dist/preFilter.js.map +1 -1
- package/dist/pushNotifier.js +37 -0
- package/dist/pushNotifier.js.map +1 -1
- package/dist/runtimeConfig.js +0 -1
- package/dist/runtimeConfig.js.map +1 -1
- package/dist/server.js +5 -4
- package/dist/server.js.map +1 -1
- package/dist/signalHandlers.js +7 -2
- package/dist/signalHandlers.js.map +1 -1
- package/dist/startup.js +0 -2
- package/dist/startup.js.map +1 -1
- package/dist/torrent.js +26 -13
- package/dist/torrent.js.map +1 -1
- package/dist/torznab.js +2 -2
- package/dist/torznab.js.map +1 -1
- package/dist/utils.js +16 -4
- package/dist/utils.js.map +1 -1
- package/package.json +5 -3
- package/dist/jackett.js +0 -64
- package/dist/jackett.js.map +0 -1
package/README.md
CHANGED
@@ -14,108 +14,29 @@ Currently the supported clients are
|
|
14
14
|
|
15
15
|
If your client isn't supported, `cross-seed` will download a bunch of torrent
|
16
16
|
files to a folder you specify. After that, I recommend using
|
17
|
-
[
|
17
|
+
[AutoTorrent2](https://github.com/JohnDoee/autotorrent2) to do the last-mile
|
18
18
|
delivery into your client.
|
19
19
|
|
20
|
+
## 🚨🚨🚨 Breaking changes in cross-seed v4 🚨🚨🚨
|
21
|
+
|
22
|
+
Head on over to the
|
23
|
+
[v4 migration guide](https://www.cross-seed.org/docs/tutorials/v4-migration-guide)
|
24
|
+
to see the steps required for migration.
|
25
|
+
|
20
26
|
## Requirements
|
21
27
|
|
22
28
|
- [Node 14+](https://nodejs.org/en/download)
|
23
29
|
- Any number of indexers that support Torznab (use Jackett or Prowlarr to
|
24
30
|
help)
|
25
31
|
|
26
|
-
|
27
|
-
work there too.
|
28
|
-
|
29
|
-
## Usage
|
30
|
-
|
31
|
-
Invoking `cross-seed` is _almost_ as simple as:
|
32
|
-
|
33
|
-
```shell script
|
34
|
-
npx cross-seed
|
35
|
-
```
|
36
|
-
|
37
|
-
Here's an example invocation:
|
38
|
-
|
39
|
-
```shell script
|
40
|
-
npx cross-seed search \
|
41
|
-
--torznab http://localhost:9696/prowlarr/1/api?apikey=a1b2c3d4e5f6 \
|
42
|
-
--torrent-dir /home/rtorrent/.session \
|
43
|
-
--output-dir /tmp/torrents
|
44
|
-
```
|
45
|
-
|
46
|
-
You either need to give it a few command-line arguments or create a
|
47
|
-
[configuration file](https://github.com/mmgoodnow/cross-seed/wiki/Configuration-file).
|
48
|
-
|
49
|
-
```text
|
50
|
-
Usage: cross-seed search [options]
|
51
|
-
|
52
|
-
Search for cross-seeds
|
53
|
-
|
54
|
-
|
55
|
-
Options:
|
56
|
-
-u, --jackett-server-url <url> DEPRECATED: Your Jackett server url
|
57
|
-
-k, --jackett-api-key <key> DEPRECATED: Your Jackett API key
|
58
|
-
-t, --trackers <tracker1>,<tracker2> DEPRECATED: Comma-separated list of Jackett tracker ids to search (Tracker ids can be found in their Torznab feed paths)
|
59
|
-
-T, --torznab <urls...> Torznab urls with apikey included (separated by spaces)
|
60
|
-
-i, --torrent-dir <dir> Directory with torrent files
|
61
|
-
-s, --output-dir <dir> Directory to save results in
|
62
|
-
-a, --search-all Search for all torrents regardless of their contents (default: false)
|
63
|
-
-e, --include-episodes Include single-episode torrents in the search (default: false)
|
64
|
-
--fuzzy-size-threshold <decimal> The size difference allowed to be considered a match. (default: 0.02)
|
65
|
-
-v, --verbose Log verbose output (default: false)
|
66
|
-
-A, --action <action> If set to 'inject', cross-seed will attempt to add the found torrents to your torrent client. (choices: "save", "inject", default: "save")
|
67
|
-
--rtorrent-rpc-url <url> The url of your rtorrent XMLRPC interface. Requires '-A inject'. See the docs for more information.
|
68
|
-
--qbittorrent-url <url> The url of your qBittorrent webui. Requires '-A inject'. See the docs for more information.
|
69
|
-
-o, --offset <offset> Offset to start from
|
70
|
-
-d, --delay <delay> Pause duration (seconds) between searches (default: 10)
|
71
|
-
-x, --exclude-older <cutoff> Exclude torrents first seen more than x minutes ago. Overrides the -a flag.
|
72
|
-
-r, --exclude-recent-search <cutoff> Exclude torrents which have been searched more recently than x minutes ago. Overrides the -a flag.
|
73
|
-
-h, --help display help for command
|
74
|
-
```
|
75
|
-
|
76
|
-
## Standalone installation
|
77
|
-
|
78
|
-
You don't need to install this app, but if
|
79
|
-
|
80
|
-
- you plan on running `cross-seed` regularly
|
81
|
-
- you want to control when you receive updates
|
82
|
-
- your version of `npm` doesn't support `npx`
|
83
|
-
|
84
|
-
you can install it globally:
|
85
|
-
|
86
|
-
```shell script
|
87
|
-
npm install -g cross-seed
|
88
|
-
```
|
89
|
-
|
90
|
-
Then you can run the app with:
|
91
|
-
|
92
|
-
```shell script
|
93
|
-
cross-seed
|
94
|
-
```
|
95
|
-
|
96
|
-
To update,
|
97
|
-
|
98
|
-
```shell script
|
99
|
-
npm uninstall -g cross-seed
|
100
|
-
npm install -g cross-seed
|
101
|
-
```
|
102
|
-
|
103
|
-
## Daemon mode (Docker recommended)
|
104
|
-
|
105
|
-
`cross-seed` supports a daemon mode, wherein the app is always running, and you
|
106
|
-
can trigger an HTTP request to search for cross-seeds of a specific torrent. See
|
107
|
-
more info in the
|
108
|
-
[wiki page](https://github.com/mmgoodnow/cross-seed/wiki/Daemon-Mode).
|
109
|
-
|
110
|
-
## Direct client injection
|
32
|
+
## Tutorial
|
111
33
|
|
112
|
-
|
113
|
-
|
114
|
-
[wiki page](https://github.com/mmgoodnow/cross-seed/wiki/Injection).
|
34
|
+
Head on over to
|
35
|
+
[cross-seed.org](https://www.cross-seed.org/docs/basics/getting-started)
|
115
36
|
|
116
37
|
## Troubleshooting
|
117
38
|
|
118
|
-
|
119
|
-
|
120
|
-
[open an issue](https://github.com/mmgoodnow/cross-seed/issues/new) or
|
121
|
-
|
39
|
+
Feel free to
|
40
|
+
[start a discussion](https://github.com/mmgoodnow/cross-seed/discussions/new) or
|
41
|
+
[open an issue](https://github.com/mmgoodnow/cross-seed/issues/new), or reach
|
42
|
+
out on [Discord](https://discord.gg/jpbUFzS5Wb).
|
package/dist/action.js
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
import chalk from "chalk";
|
2
|
+
import { getClient } from "./clients/TorrentClient.js";
|
3
|
+
import { Action, InjectionResult, SaveResult, } from "./constants.js";
|
4
|
+
import { logger } from "./logger.js";
|
5
|
+
import { getRuntimeConfig } from "./runtimeConfig.js";
|
6
|
+
import { saveTorrentFile } from "./torrent.js";
|
7
|
+
import { getTag } from "./utils.js";
|
8
|
+
export async function performAction(newMeta, searchee, tracker, nonceOptions) {
|
9
|
+
const { action } = getRuntimeConfig();
|
10
|
+
const styledName = chalk.green.bold(newMeta.name);
|
11
|
+
const styledTracker = chalk.bold(tracker);
|
12
|
+
if (action === Action.INJECT) {
|
13
|
+
const result = await getClient().inject(newMeta, searchee, nonceOptions);
|
14
|
+
switch (result) {
|
15
|
+
case InjectionResult.SUCCESS:
|
16
|
+
logger.info(`Found ${styledName} on ${styledTracker} - injected`);
|
17
|
+
break;
|
18
|
+
case InjectionResult.ALREADY_EXISTS:
|
19
|
+
logger.info(`Found ${styledName} on ${styledTracker} - exists`);
|
20
|
+
break;
|
21
|
+
case InjectionResult.TORRENT_NOT_COMPLETE:
|
22
|
+
logger.warn(`Found ${styledName} on ${styledTracker} - skipping incomplete torrent`);
|
23
|
+
break;
|
24
|
+
case InjectionResult.FAILURE:
|
25
|
+
default:
|
26
|
+
logger.error(`Found ${styledName} on ${styledTracker} - failed to inject, saving instead`);
|
27
|
+
saveTorrentFile(tracker, getTag(searchee.name), newMeta, nonceOptions);
|
28
|
+
break;
|
29
|
+
}
|
30
|
+
return result;
|
31
|
+
}
|
32
|
+
else {
|
33
|
+
saveTorrentFile(tracker, getTag(searchee.name), newMeta, nonceOptions);
|
34
|
+
logger.info(`Found ${styledName} on ${styledTracker} - saved`);
|
35
|
+
return SaveResult.SAVED;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
export async function performActions(searchee, matches, nonceOptions) {
|
39
|
+
const results = [];
|
40
|
+
for (const { tracker, assessment } of matches) {
|
41
|
+
const result = await performAction(assessment.metafile, searchee, tracker, nonceOptions);
|
42
|
+
results.push(result);
|
43
|
+
if (result === InjectionResult.TORRENT_NOT_COMPLETE)
|
44
|
+
break;
|
45
|
+
}
|
46
|
+
return results;
|
47
|
+
}
|
48
|
+
//# sourceMappingURL=action.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"action.js","sourceRoot":"","sources":["../src/action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EACN,MAAM,EAEN,eAAe,EACf,UAAU,GACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE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,MAAM;SACP;QACD,OAAO,MAAM,CAAC;KACd;SAAM;QACN,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC;QACvE,MAAM,CAAC,IAAI,CAAC,SAAS,UAAU,OAAO,aAAa,UAAU,CAAC,CAAC;QAC/D,OAAO,UAAU,CAAC,KAAK,CAAC;KACxB;AACF,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,YAAY;IACnE,MAAM,OAAO,GAAmB,EAAE,CAAC;IACnC,KAAK,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,OAAO,EAAE;QAC9C,MAAM,MAAM,GAAG,MAAM,aAAa,CACjC,UAAU,CAAC,QAAQ,EACnB,QAAQ,EACR,OAAO,EACP,YAAY,CACZ,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACrB,IAAI,MAAM,KAAK,eAAe,CAAC,oBAAoB;YAAE,MAAM;KAC3D;IACD,OAAO,OAAO,CAAC;AAChB,CAAC"}
|
package/dist/cache.js
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
import { readFile, rename } from "fs/promises";
|
2
|
+
import path from "path";
|
3
|
+
import { appDir, createAppDir } from "./configuration.js";
|
4
|
+
createAppDir();
|
5
|
+
export async function getCacheFileData() {
|
6
|
+
return readFile(path.join(appDir(), "cache.json"))
|
7
|
+
.then((data) => JSON.parse(data.toString()))
|
8
|
+
.catch(() => undefined);
|
9
|
+
}
|
10
|
+
export async function renameCacheFile() {
|
11
|
+
return rename(path.join(appDir(), "cache.json"), path.join(appDir(), "old-cache.bak.json"));
|
12
|
+
}
|
13
|
+
//# sourceMappingURL=cache.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../src/cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAG1D,YAAY,EAAE,CAAC;AA4Bf,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACrC,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,YAAY,CAAC,CAAC;SAChD,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;SAC3C,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;AAC1B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,eAAe;IACpC,OAAO,MAAM,CACZ,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,YAAY,CAAC,EACjC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,oBAAoB,CAAC,CACzC,CAAC;AACH,CAAC"}
|
package/dist/cmd.js
CHANGED
@@ -2,12 +2,13 @@
|
|
2
2
|
import chalk from "chalk";
|
3
3
|
import { Option, program } from "commander";
|
4
4
|
import { createRequire } from "module";
|
5
|
+
import ms from "ms";
|
5
6
|
import { inspect } from "util";
|
6
7
|
import { generateConfig, getFileConfig } from "./configuration.js";
|
7
8
|
import { Action } from "./constants.js";
|
8
|
-
import {
|
9
|
+
import { jobsLoop } from "./jobs.js";
|
9
10
|
import { diffCmd } from "./diff.js";
|
10
|
-
import { CrossSeedError } from "./errors.js";
|
11
|
+
import { CrossSeedError, exitOnCrossSeedErrors } from "./errors.js";
|
11
12
|
import { initializeLogger, Label, logger } from "./logger.js";
|
12
13
|
import { main } from "./pipeline.js";
|
13
14
|
import { initializePushNotifier, sendTestNotification, } from "./pushNotifier.js";
|
@@ -15,6 +16,7 @@ import { setRuntimeConfig } from "./runtimeConfig.js";
|
|
15
16
|
import { createSearcheeFromMetafile } from "./searchee.js";
|
16
17
|
import { serve } from "./server.js";
|
17
18
|
import "./signalHandlers.js";
|
19
|
+
import { db } from "./db.js";
|
18
20
|
import { doStartupValidation } from "./startup.js";
|
19
21
|
import { parseTorrentFromFilename } from "./torrent.js";
|
20
22
|
const require = createRequire(import.meta.url);
|
@@ -27,27 +29,33 @@ function fallback(...args) {
|
|
27
29
|
return undefined;
|
28
30
|
}
|
29
31
|
function processOptions(options) {
|
30
|
-
|
31
|
-
|
32
|
+
if (options.rssCadence) {
|
33
|
+
options.rssCadence = Math.max(ms(options.rssCadence), ms("10 minutes"));
|
34
|
+
}
|
35
|
+
if (options.searchCadence) {
|
36
|
+
options.searchCadence = Math.max(ms(options.searchCadence), ms("1 day"));
|
37
|
+
}
|
38
|
+
if (options.excludeOlder) {
|
39
|
+
options.excludeOlder = ms(options.excludeOlder);
|
40
|
+
}
|
41
|
+
if (options.excludeRecentSearch) {
|
42
|
+
options.excludeRecentSearch = ms(options.excludeRecentSearch);
|
43
|
+
}
|
32
44
|
return options;
|
33
45
|
}
|
34
46
|
const fileConfig = await getFileConfig();
|
35
47
|
function createCommandWithSharedOptions(name, description) {
|
36
|
-
var _a;
|
37
48
|
return program
|
38
49
|
.command(name)
|
39
50
|
.description(description)
|
40
|
-
.option("-u, --jackett-server-url <url>", "DEPRECATED: Your Jackett server url", fileConfig.jackettServerUrl)
|
41
|
-
.option("-k, --jackett-api-key <key>", "DEPRECATED: Your Jackett API key", fileConfig.jackettApiKey)
|
42
|
-
.option("-t, --trackers <tracker1>,<tracker2>", "DEPRECATED: Comma-separated list of Jackett tracker ids to search (Tracker ids can be found in their Torznab feed paths)", fallback((_a = fileConfig.trackers) === null || _a === void 0 ? void 0 : _a.join(","), ""))
|
43
51
|
.option("-T, --torznab <urls...>", "Torznab urls with apikey included (separated by spaces)", fallback(fileConfig.torznab))
|
44
52
|
.requiredOption("-i, --torrent-dir <dir>", "Directory with torrent files", fileConfig.torrentDir)
|
45
53
|
.requiredOption("-s, --output-dir <dir>", "Directory to save results in", fileConfig.outputDir)
|
46
|
-
.requiredOption("
|
54
|
+
.requiredOption("--include-non-videos", "Include torrents which contain non-video files", fallback(fileConfig.includeNonVideos, false))
|
47
55
|
.option("-e, --include-episodes", "Include single-episode torrents in the search", fallback(fileConfig.includeEpisodes, false))
|
48
56
|
.requiredOption("--fuzzy-size-threshold <decimal>", "The size difference allowed to be considered a match.", fallback(fileConfig.fuzzySizeThreshold, 0.02))
|
49
|
-
.option("-x, --exclude-older <cutoff>", "Exclude torrents first seen more than n minutes ago. Bypasses the -a flag.",
|
50
|
-
.option("-r, --exclude-recent-search <cutoff>", "Exclude torrents which have been searched more recently than n minutes ago. Bypasses the -a flag.",
|
57
|
+
.option("-x, --exclude-older <cutoff>", "Exclude torrents first seen more than n minutes ago. Bypasses the -a flag.", fileConfig.excludeOlder)
|
58
|
+
.option("-r, --exclude-recent-search <cutoff>", "Exclude torrents which have been searched more recently than n minutes ago. Bypasses the -a flag.", fileConfig.excludeRecentSearch)
|
51
59
|
.requiredOption("-v, --verbose", "Log verbose output", false)
|
52
60
|
.addOption(new Option("-A, --action <action>", "If set to 'inject', cross-seed will attempt to add the found torrents to your torrent client.")
|
53
61
|
.default(fallback(fileConfig.action, Action.SAVE))
|
@@ -55,7 +63,8 @@ function createCommandWithSharedOptions(name, description) {
|
|
55
63
|
.makeOptionMandatory())
|
56
64
|
.option("--rtorrent-rpc-url <url>", "The url of your rtorrent XMLRPC interface. Requires '-A inject'. See the docs for more information.", fileConfig.rtorrentRpcUrl)
|
57
65
|
.option("--qbittorrent-url <url>", "The url of your qBittorrent webui. Requires '-A inject'. See the docs for more information.", fileConfig.qbittorrentUrl)
|
58
|
-
.option("--notification-webhook-url <url>", "cross-seed will send POST requests to this url with a JSON payload of { title, body }", fileConfig.notificationWebhookUrl)
|
66
|
+
.option("--notification-webhook-url <url>", "cross-seed will send POST requests to this url with a JSON payload of { title, body }", fileConfig.notificationWebhookUrl)
|
67
|
+
.requiredOption("-d, --delay <delay>", "Pause duration (seconds) between searches", parseFloat, fallback(fileConfig.delay, 10));
|
59
68
|
}
|
60
69
|
program.name(packageDotJson.name);
|
61
70
|
program.description(chalk.yellow.bold("cross-seed"));
|
@@ -70,7 +79,9 @@ program
|
|
70
79
|
program
|
71
80
|
.command("clear-cache")
|
72
81
|
.description("Clear the cache of downloaded-and-rejected torrents")
|
73
|
-
.action(
|
82
|
+
.action(async () => {
|
83
|
+
await db("decision").del();
|
84
|
+
});
|
74
85
|
program
|
75
86
|
.command("test-notification")
|
76
87
|
.description("Send a test notification")
|
@@ -96,6 +107,8 @@ program
|
|
96
107
|
});
|
97
108
|
createCommandWithSharedOptions("daemon", "Start the cross-seed daemon")
|
98
109
|
.option("-p, --port <port>", "Listen on a custom port", (n) => parseInt(n), fallback(fileConfig.port, 2468))
|
110
|
+
.option("--search-cadence <cadence>", "Run searches on a schedule. Format: https://github.com/vercel/ms", fileConfig.searchCadence)
|
111
|
+
.option("--rss-cadence <cadence>", "Run an rss scan on a schedule. Format: https://github.com/vercel/ms", fileConfig.rssCadence)
|
99
112
|
.action(async (options) => {
|
100
113
|
try {
|
101
114
|
const runtimeConfig = processOptions(options);
|
@@ -109,8 +122,10 @@ createCommandWithSharedOptions("daemon", "Start the cross-seed daemon")
|
|
109
122
|
if (process.env.DOCKER_ENV === "true") {
|
110
123
|
generateConfig({ docker: true });
|
111
124
|
}
|
125
|
+
await db.migrate.latest();
|
112
126
|
await doStartupValidation();
|
113
|
-
|
127
|
+
serve(options.port);
|
128
|
+
jobsLoop();
|
114
129
|
}
|
115
130
|
catch (e) {
|
116
131
|
if (e instanceof CrossSeedError) {
|
@@ -122,9 +137,7 @@ createCommandWithSharedOptions("daemon", "Start the cross-seed daemon")
|
|
122
137
|
}
|
123
138
|
});
|
124
139
|
createCommandWithSharedOptions("search", "Search for cross-seeds")
|
125
|
-
.
|
126
|
-
.requiredOption("-d, --delay <delay>", "Pause duration (seconds) between searches", parseFloat, fallback(fileConfig.delay, 10))
|
127
|
-
.addOption(new Option("--torrents <torrents...>", "torrent files separated by spaces. This is a debug option and may be removed without warning.").hideHelp())
|
140
|
+
.addOption(new Option("--torrents <torrents...>", "torrent files separated by spaces").hideHelp())
|
128
141
|
.action(async (options) => {
|
129
142
|
try {
|
130
143
|
const runtimeConfig = processOptions(options);
|
@@ -138,17 +151,15 @@ createCommandWithSharedOptions("search", "Search for cross-seeds")
|
|
138
151
|
if (process.env.DOCKER_ENV === "true") {
|
139
152
|
generateConfig({ docker: true });
|
140
153
|
}
|
154
|
+
await db.migrate.latest();
|
141
155
|
await doStartupValidation();
|
142
156
|
await main();
|
157
|
+
await db.destroy();
|
143
158
|
}
|
144
159
|
catch (e) {
|
145
|
-
|
146
|
-
e.print();
|
147
|
-
process.exitCode = 1;
|
148
|
-
return;
|
149
|
-
}
|
150
|
-
throw e;
|
160
|
+
exitOnCrossSeedErrors(e);
|
151
161
|
}
|
152
162
|
});
|
163
|
+
program.showHelpAfterError("(add --help for additional information)");
|
153
164
|
await program.parseAsync();
|
154
165
|
//# sourceMappingURL=cmd.js.map
|
package/dist/cmd.js.map
CHANGED
@@ -1 +1 @@
|
|
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,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"cmd.js","sourceRoot":"","sources":["../src/cmd.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,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AAE,CACZ;KACA,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IACzB,IAAI;QACH,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;QAC9C,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAChC,gBAAgB,EAAE,CAAC;QACnB,sBAAsB,EAAE,CAAC;QACzB,MAAM,CAAC,OAAO,CAAC;YACd,KAAK,EAAE,KAAK,CAAC,UAAU;YACvB,OAAO,EAAE,OAAO,CAAC,aAAa,CAAC;SAC/B,CAAC,CAAC;QACH,IAAI,OAAO,CAAC,GAAG,CAAC,UAAU,KAAK,MAAM,EAAE;YACtC,cAAc,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;SACjC;QAED,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QAC1B,MAAM,mBAAmB,EAAE,CAAC;QAC5B,MAAM,IAAI,EAAE,CAAC;QACb,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC;KACnB;IAAC,OAAO,CAAC,EAAE;QACX,qBAAqB,CAAC,CAAC,CAAC,CAAC;KACzB;AACF,CAAC,CAAC,CAAC;AAEJ,OAAO,CAAC,kBAAkB,CAAC,yCAAyC,CAAC,CAAC;AAEtE,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC"}
|
package/dist/config.template.cjs
CHANGED
@@ -1,26 +1,13 @@
|
|
1
|
+
"use strict";
|
1
2
|
// If you find yourself always using the same command-line flag, you can set
|
2
3
|
// it here as a default.
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
5
|
module.exports = {
|
4
6
|
/**
|
5
|
-
*
|
6
|
-
*/
|
7
|
-
jackettServerUrl: "http://localhost:9117/jackett",
|
8
|
-
/**
|
9
|
-
* @deprecated use torznab instead
|
10
|
-
*/
|
11
|
-
jackettApiKey: "YOUR_JACKETT_API_KEY_HERE",
|
12
|
-
/**
|
13
|
-
* Pause at least this much in between each Jackett search. Higher is safer.
|
7
|
+
* Pause at least this much in between each search. Higher is safer.
|
14
8
|
* It is not recommended to set this to less than 2 seconds.
|
15
9
|
*/
|
16
10
|
delay: 10,
|
17
|
-
/**
|
18
|
-
* @deprecated use torznab instead
|
19
|
-
* Trackers to search
|
20
|
-
* Set to [] if you want to search all trackers.
|
21
|
-
* Tracker ids can be found in their Torznab feed paths
|
22
|
-
*/
|
23
|
-
trackers: ["oink", "tehconnection"],
|
24
11
|
/**
|
25
12
|
* List of Torznab urls.
|
26
13
|
* The path should end in /api
|
@@ -44,22 +31,33 @@ module.exports = {
|
|
44
31
|
*/
|
45
32
|
includeEpisodes: false,
|
46
33
|
/**
|
47
|
-
*
|
48
|
-
*
|
34
|
+
* Include torrents which contain non-video files
|
35
|
+
* This option does not override includeEpisodes.
|
36
|
+
* To search for everything except episodes, use (includeEpisodes: false, includeNonVideos: true)
|
37
|
+
* To search for everything including episodes, use (includeEpisodes: true, includeNonVideos: true)
|
49
38
|
*/
|
50
|
-
|
39
|
+
includeNonVideos: false,
|
51
40
|
/**
|
52
41
|
* fuzzy size match threshold
|
53
42
|
* decimal value (0.02 = 2%)
|
54
43
|
*/
|
55
44
|
fuzzySizeThreshold: 0.02,
|
56
45
|
/**
|
57
|
-
* Exclude torrents first seen more than
|
46
|
+
* Exclude torrents first seen more than this long ago.
|
47
|
+
* Format: https://github.com/vercel/ms
|
48
|
+
* Examples:
|
49
|
+
* "10min"
|
50
|
+
* "2w"
|
51
|
+
* "3 days"
|
58
52
|
*/
|
59
53
|
excludeOlder: undefined,
|
60
54
|
/**
|
61
55
|
* Exclude torrents which have been searched
|
62
|
-
* more recently than
|
56
|
+
* more recently than this long ago.
|
57
|
+
* Examples:
|
58
|
+
* "10min"
|
59
|
+
* "2w"
|
60
|
+
* "3 days"
|
63
61
|
*/
|
64
62
|
excludeRecentSearch: undefined,
|
65
63
|
/**
|
@@ -90,5 +88,24 @@ module.exports = {
|
|
90
88
|
* Listen on a custom port.
|
91
89
|
*/
|
92
90
|
port: 2468,
|
91
|
+
/**
|
92
|
+
* Run rss scans on a schedule. Format: https://github.com/vercel/ms
|
93
|
+
* Set to undefined or null to disable. Minimum of 10 minutes.
|
94
|
+
* Examples:
|
95
|
+
* "10min"
|
96
|
+
* "2w"
|
97
|
+
* "3 days"
|
98
|
+
*/
|
99
|
+
rssCadence: undefined,
|
100
|
+
/**
|
101
|
+
* Run searches on a schedule. Format: https://github.com/vercel/ms
|
102
|
+
* Set to undefined or null to disable. Minimum of 1 day.
|
103
|
+
* If you have RSS enabled, you won't need this to run often (2+ weeks recommended)
|
104
|
+
* Examples:
|
105
|
+
* "10min"
|
106
|
+
* "2w"
|
107
|
+
* "3 days"
|
108
|
+
*/
|
109
|
+
searchCadence: undefined,
|
93
110
|
};
|
94
111
|
//# sourceMappingURL=config.template.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"config.template.cjs","sourceRoot":"","sources":["../src/config.template.cjs"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,wBAAwB
|
1
|
+
{"version":3,"file":"config.template.cjs","sourceRoot":"","sources":["../src/config.template.cjs"],"names":[],"mappings":";AAAA,4EAA4E;AAC5E,wBAAwB;;AAExB,MAAM,CAAC,OAAO,GAAG;IAChB;;;OAGG;IACH,KAAK,EAAE,EAAE;IACT;;;;;OAKG;IACH,OAAO,EAAE,EAAE;IAEX;;;;;OAKG;IACH,UAAU,EAAE,2BAA2B;IAEvC;;OAEG;IACH,SAAS,EAAE,GAAG;IAEd;;OAEG;IACH,eAAe,EAAE,KAAK;IAEtB;;;;;OAKG;IACH,gBAAgB,EAAE,KAAK;IAEvB;;;OAGG;IACH,kBAAkB,EAAE,IAAI;IAExB;;;;;;;OAOG;IACH,YAAY,EAAE,SAAS;IAEvB;;;;;;;OAOG;IACH,mBAAmB,EAAE,SAAS;IAE9B;;;OAGG;IACH,MAAM,EAAE,MAAM;IAEd;;;;OAIG;IACH,cAAc,EAAE,SAAS;IAEzB;;;;;OAKG;IACH,cAAc,EAAE,SAAS;IAEzB;;;;OAIG;IACH,sBAAsB,EAAE,SAAS;IAEjC;;OAEG;IACH,IAAI,EAAE,IAAI;IAEV;;;;;;;OAOG;IACH,UAAU,EAAE,SAAS;IAErB;;;;;;;;OAQG;IACH,aAAa,EAAE,SAAS;CACxB,CAAC"}
|
@@ -1,30 +1,18 @@
|
|
1
|
+
"use strict";
|
1
2
|
// If you find yourself always using the same command-line flag, you can set
|
2
3
|
// it here as a default.
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
5
|
module.exports = {
|
4
|
-
|
5
|
-
*
|
6
|
-
*/
|
7
|
-
jackettServerUrl: "http://localhost:9117/jackett",
|
8
|
-
/**
|
9
|
-
* @deprecated use torznab instead
|
10
|
-
*/
|
11
|
-
jackettApiKey: "YOUR_JACKETT_API_KEY_HERE",
|
12
|
-
/**
|
13
|
-
* Pause at least this much in between each Jackett search. Higher is safer.
|
6
|
+
/*
|
7
|
+
* Pause at least this much in between each search. Higher is safer.
|
14
8
|
* It is not recommended to set this to less than 2 seconds.
|
15
9
|
*/
|
16
10
|
delay: 10,
|
17
11
|
/**
|
18
|
-
*
|
19
|
-
* Trackers to search
|
20
|
-
* Set to [] if you want to search all trackers.
|
21
|
-
* Tracker ids can be found in their Torznab feed paths
|
22
|
-
*/
|
23
|
-
trackers: ["oink", "tehconnection"],
|
24
|
-
/**
|
25
|
-
* List of Torznab urls.
|
12
|
+
* List of Torznab URLs.
|
26
13
|
* For Jackett, click "Copy RSS feed"
|
27
14
|
* For Prowlarr, click (i) and copy the Torznab Url, then append "?apikey=YOUR_PROWLARR_API_KEY"
|
15
|
+
* Wrap each URL in quotation marks, and separate them with commas.
|
28
16
|
*/
|
29
17
|
torznab: [],
|
30
18
|
/**
|
@@ -47,22 +35,33 @@ module.exports = {
|
|
47
35
|
*/
|
48
36
|
includeEpisodes: false,
|
49
37
|
/**
|
50
|
-
*
|
51
|
-
*
|
38
|
+
* Include torrents which contain non-video files
|
39
|
+
* This option does not override includeEpisodes.
|
40
|
+
* To search for everything except episodes, use (includeEpisodes: false, includeNonVideos: true)
|
41
|
+
* To search for everything including episodes, use (includeEpisodes: true, includeNonVideos: true)
|
52
42
|
*/
|
53
|
-
|
43
|
+
includeNonVideos: false,
|
54
44
|
/**
|
55
45
|
* fuzzy size match threshold
|
56
46
|
* decimal value (0.02 = 2%)
|
57
47
|
*/
|
58
48
|
fuzzySizeThreshold: 0.02,
|
59
49
|
/**
|
60
|
-
* Exclude torrents first seen more than
|
50
|
+
* Exclude torrents first seen more than this long ago.
|
51
|
+
* Format: https://github.com/vercel/ms
|
52
|
+
* Examples:
|
53
|
+
* "10min"
|
54
|
+
* "2w"
|
55
|
+
* "3 days"
|
61
56
|
*/
|
62
57
|
excludeOlder: undefined,
|
63
58
|
/**
|
64
59
|
* Exclude torrents which have been searched
|
65
|
-
* more recently than
|
60
|
+
* more recently than this long ago.
|
61
|
+
* Examples:
|
62
|
+
* "10min"
|
63
|
+
* "2w"
|
64
|
+
* "3 days"
|
66
65
|
*/
|
67
66
|
excludeRecentSearch: undefined,
|
68
67
|
/**
|
@@ -93,5 +92,24 @@ module.exports = {
|
|
93
92
|
* Listen on a custom port.
|
94
93
|
*/
|
95
94
|
port: 2468,
|
95
|
+
/**
|
96
|
+
* Run rss scans on a schedule. Format: https://github.com/vercel/ms
|
97
|
+
* Set to undefined or null to disable. Minimum of 10 minutes.
|
98
|
+
* Examples:
|
99
|
+
* "10min"
|
100
|
+
* "2w"
|
101
|
+
* "3 days"
|
102
|
+
*/
|
103
|
+
rssCadence: undefined,
|
104
|
+
/**
|
105
|
+
* Run searches on a schedule. Format: https://github.com/vercel/ms
|
106
|
+
* Set to undefined or null to disable. Minimum of 1 day.
|
107
|
+
* If you have RSS enabled, you won't need this to run often (2+ weeks recommended)
|
108
|
+
* Examples:
|
109
|
+
* "10min"
|
110
|
+
* "2w"
|
111
|
+
* "3 days"
|
112
|
+
*/
|
113
|
+
searchCadence: undefined,
|
96
114
|
};
|
97
115
|
//# sourceMappingURL=config.template.docker.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"config.template.docker.cjs","sourceRoot":"","sources":["../src/config.template.docker.cjs"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,wBAAwB
|
1
|
+
{"version":3,"file":"config.template.docker.cjs","sourceRoot":"","sources":["../src/config.template.docker.cjs"],"names":[],"mappings":";AAAA,4EAA4E;AAC5E,wBAAwB;;AAExB,MAAM,CAAC,OAAO,GAAG;IAChB;;;OAGG;IACH,KAAK,EAAE,EAAE;IAET;;;;;OAKG;IACH,OAAO,EAAE,EAAE;IAEX;;;;;;;OAOG;IACH,UAAU,EAAE,WAAW;IAEvB;;;;OAIG;IACH,SAAS,EAAE,cAAc;IAEzB;;OAEG;IACH,eAAe,EAAE,KAAK;IAEtB;;;;;OAKG;IACH,gBAAgB,EAAE,KAAK;IAEvB;;;OAGG;IACH,kBAAkB,EAAE,IAAI;IAExB;;;;;;;OAOG;IACH,YAAY,EAAE,SAAS;IAEvB;;;;;;;OAOG;IACH,mBAAmB,EAAE,SAAS;IAE9B;;;OAGG;IACH,MAAM,EAAE,MAAM;IAEd;;;;OAIG;IACH,cAAc,EAAE,SAAS;IAEzB;;;;;OAKG;IACH,cAAc,EAAE,SAAS;IAEzB;;;;OAIG;IACH,sBAAsB,EAAE,SAAS;IAEjC;;OAEG;IACH,IAAI,EAAE,IAAI;IAEV;;;;;;;OAOG;IACH,UAAU,EAAE,SAAS;IAErB;;;;;;;;OAQG;IACH,aAAa,EAAE,SAAS;CAExB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../src/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,IAAI,M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_EXISTS";
|
16
16
|
InjectionResult[InjectionResult["TORRENT_NOT_COMPLETE"] = 3] = "TORRENT_NOT_COMPLETE";
|
17
17
|
})(InjectionResult = InjectionResult || (InjectionResult = {}));
|
18
|
+
export var SaveResult;
|
19
|
+
(function (SaveResult) {
|
20
|
+
SaveResult[SaveResult["SAVED"] = 0] = "SAVED";
|
21
|
+
})(SaveResult = SaveResult || (SaveResult = {}));
|
18
22
|
export var Decision;
|
19
23
|
(function (Decision) {
|
20
24
|
Decision["MATCH"] = "MATCH";
|
package/dist/constants.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,mDAAmD,CAAC;AAC5E,MAAM,CAAC,MAAM,YAAY,GACxB,0EAA0E,CAAC;AAC5E,MAAM,CAAC,MAAM,WAAW,GACvB,qDAAqD,CAAC;AAEvD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;AAEhD,MAAM,CAAC,MAAM,oBAAoB,GAAG,eAAe,CAAC;AAEpD,MAAM,CAAN,IAAY,MAGX;AAHD,WAAY,MAAM;IACjB,uBAAa,CAAA;IACb,2BAAiB,CAAA;AAClB,CAAC,EAHW,MAAM,GAAN,MAAM,KAAN,MAAM,QAGjB;AAED,MAAM,CAAN,IAAY,eAKX;AALD,WAAY,eAAe;IAC1B,2DAAO,CAAA;IACP,2DAAO,CAAA;IACP,yEAAc,CAAA;IACd,qFAAoB,CAAA;AACrB,CAAC,EALW,eAAe,GAAf,eAAe,KAAf,eAAe,QAK1B;AAED,MAAM,CAAN,IAAY,QAOX;AAPD,WAAY,QAAQ;IACnB,2BAAe,CAAA;IACf,2CAA+B,CAAA;IAC/B,iDAAqC,CAAA;IACrC,+CAAmC,CAAA;IACnC,iEAAqD,CAAA;IACrD,qDAAyC,CAAA;AAC1C,CAAC,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