tor-dl 1.0.13 → 1.0.15
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 +45 -0
- package/dist/cli/display.d.ts.map +1 -1
- package/dist/cli/display.js +68 -2
- package/dist/cli/display.js.map +1 -1
- package/dist/sources/yts.js +1 -1
- package/dist/sources/yts.js.map +1 -1
- package/package.json +34 -34
- package/src/cli/display.ts +59 -2
- package/src/sources/yts.ts +85 -85
- package/dist/cli/progress.d.ts +0 -15
- package/dist/cli/progress.d.ts.map +0 -1
- package/dist/cli/progress.js +0 -76
- package/dist/cli/progress.js.map +0 -1
- package/dist/src/cli/display.d.ts +0 -7
- package/dist/src/cli/display.d.ts.map +0 -1
- package/dist/src/cli/display.js +0 -59
- package/dist/src/cli/display.js.map +0 -1
- package/dist/src/cli/parser.d.ts +0 -5
- package/dist/src/cli/parser.d.ts.map +0 -1
- package/dist/src/cli/parser.js +0 -122
- package/dist/src/cli/parser.js.map +0 -1
- package/dist/src/cli/progress.d.ts +0 -15
- package/dist/src/cli/progress.d.ts.map +0 -1
- package/dist/src/cli/progress.js +0 -76
- package/dist/src/cli/progress.js.map +0 -1
- package/dist/src/commands/download.d.ts +0 -2
- package/dist/src/commands/download.d.ts.map +0 -1
- package/dist/src/commands/download.js +0 -70
- package/dist/src/commands/download.js.map +0 -1
- package/dist/src/commands/search.d.ts +0 -3
- package/dist/src/commands/search.d.ts.map +0 -1
- package/dist/src/commands/search.js +0 -46
- package/dist/src/commands/search.js.map +0 -1
- package/dist/src/commands/update.d.ts +0 -2
- package/dist/src/commands/update.d.ts.map +0 -1
- package/dist/src/commands/update.js +0 -32
- package/dist/src/commands/update.js.map +0 -1
- package/dist/src/download/engine.d.ts +0 -6
- package/dist/src/download/engine.d.ts.map +0 -1
- package/dist/src/download/engine.js +0 -163
- package/dist/src/download/engine.js.map +0 -1
- package/dist/src/filters/category.d.ts +0 -3
- package/dist/src/filters/category.d.ts.map +0 -1
- package/dist/src/filters/category.js +0 -24
- package/dist/src/filters/category.js.map +0 -1
- package/dist/src/filters/index.d.ts +0 -5
- package/dist/src/filters/index.d.ts.map +0 -1
- package/dist/src/filters/index.js +0 -13
- package/dist/src/filters/index.js.map +0 -1
- package/dist/src/filters/seeds.d.ts +0 -3
- package/dist/src/filters/seeds.d.ts.map +0 -1
- package/dist/src/filters/seeds.js +0 -7
- package/dist/src/filters/seeds.js.map +0 -1
- package/dist/src/filters/size.d.ts +0 -4
- package/dist/src/filters/size.d.ts.map +0 -1
- package/dist/src/filters/size.js +0 -36
- package/dist/src/filters/size.js.map +0 -1
- package/dist/src/filters/sort.d.ts +0 -5
- package/dist/src/filters/sort.d.ts.map +0 -1
- package/dist/src/filters/sort.js +0 -25
- package/dist/src/filters/sort.js.map +0 -1
- package/dist/src/index.d.ts +0 -11
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -30
- package/dist/src/index.js.map +0 -1
- package/dist/src/sources/1337x.d.ts +0 -11
- package/dist/src/sources/1337x.d.ts.map +0 -1
- package/dist/src/sources/1337x.js +0 -121
- package/dist/src/sources/1337x.js.map +0 -1
- package/dist/src/sources/eztv.d.ts +0 -11
- package/dist/src/sources/eztv.d.ts.map +0 -1
- package/dist/src/sources/eztv.js +0 -104
- package/dist/src/sources/eztv.js.map +0 -1
- package/dist/src/sources/httpClient.d.ts +0 -24
- package/dist/src/sources/httpClient.d.ts.map +0 -1
- package/dist/src/sources/httpClient.js +0 -42
- package/dist/src/sources/httpClient.js.map +0 -1
- package/dist/src/sources/limetorrent.d.ts +0 -11
- package/dist/src/sources/limetorrent.d.ts.map +0 -1
- package/dist/src/sources/limetorrent.js +0 -113
- package/dist/src/sources/limetorrent.js.map +0 -1
- package/dist/src/sources/nyaa.d.ts +0 -11
- package/dist/src/sources/nyaa.d.ts.map +0 -1
- package/dist/src/sources/nyaa.js +0 -119
- package/dist/src/sources/nyaa.js.map +0 -1
- package/dist/src/sources/rarbg.d.ts +0 -11
- package/dist/src/sources/rarbg.d.ts.map +0 -1
- package/dist/src/sources/rarbg.js +0 -122
- package/dist/src/sources/rarbg.js.map +0 -1
- package/dist/src/sources/registry.d.ts +0 -9
- package/dist/src/sources/registry.d.ts.map +0 -1
- package/dist/src/sources/registry.js +0 -70
- package/dist/src/sources/registry.js.map +0 -1
- package/dist/src/sources/solidtorrents.d.ts +0 -11
- package/dist/src/sources/solidtorrents.d.ts.map +0 -1
- package/dist/src/sources/solidtorrents.js +0 -105
- package/dist/src/sources/solidtorrents.js.map +0 -1
- package/dist/src/sources/thepiratebay.d.ts +0 -11
- package/dist/src/sources/thepiratebay.d.ts.map +0 -1
- package/dist/src/sources/thepiratebay.js +0 -67
- package/dist/src/sources/thepiratebay.js.map +0 -1
- package/dist/src/sources/torlock.d.ts +0 -11
- package/dist/src/sources/torlock.d.ts.map +0 -1
- package/dist/src/sources/torlock.js +0 -116
- package/dist/src/sources/torlock.js.map +0 -1
- package/dist/src/sources/torrentproject.d.ts +0 -11
- package/dist/src/sources/torrentproject.d.ts.map +0 -1
- package/dist/src/sources/torrentproject.js +0 -105
- package/dist/src/sources/torrentproject.js.map +0 -1
- package/dist/src/sources/torrentscsv.d.ts +0 -11
- package/dist/src/sources/torrentscsv.d.ts.map +0 -1
- package/dist/src/sources/torrentscsv.js +0 -62
- package/dist/src/sources/torrentscsv.js.map +0 -1
- package/dist/src/sources/yts.d.ts +0 -12
- package/dist/src/sources/yts.d.ts.map +0 -1
- package/dist/src/sources/yts.js +0 -88
- package/dist/src/sources/yts.js.map +0 -1
- package/dist/src/types.d.ts +0 -60
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/types.js +0 -3
- package/dist/src/types.js.map +0 -1
package/README.md
CHANGED
|
@@ -177,8 +177,53 @@ For Windows users, you can install Transmission client using winget:
|
|
|
177
177
|
winget install Transmission.Transmission
|
|
178
178
|
```
|
|
179
179
|
|
|
180
|
+
Or download directly from the official website:
|
|
181
|
+
|
|
182
|
+
- **Windows**: [https://transmissionbt.com/download](https://transmissionbt.com/download)
|
|
183
|
+
|
|
180
184
|
After installation, you can open magnet links directly in Transmission.
|
|
181
185
|
|
|
186
|
+
## Transfer to Mobile/Tablet/Apple TV
|
|
187
|
+
|
|
188
|
+
After your download completes in Transmission, you can transfer the file directly to VLC on your mobile device, tablet, or Apple TV using WiFi transfer.
|
|
189
|
+
|
|
190
|
+
- If devices in different subnets: To connect to devices on different networks, port forwarding or routing must be configured on the network device which placed between them
|
|
191
|
+
|
|
192
|
+
### Prerequisites
|
|
193
|
+
|
|
194
|
+
1. **Set a Static IP** on your mobile device/tablet/Apple TV to ensure the IP address doesn't change
|
|
195
|
+
2. Enable WiFi transfer on your device (VLC for iOS/Android has built-in WiFi transfer feature)
|
|
196
|
+
|
|
197
|
+
### Setting Static IP
|
|
198
|
+
|
|
199
|
+
- **Mobile/Tablet**: Settings → WiFi → Long press your network → Modify Network → Set static IP
|
|
200
|
+
- **Apple TV**: Settings → Network → Configure IP manually (or use DHCP with reserved IP on your router)
|
|
201
|
+
|
|
202
|
+
### Upload Script
|
|
203
|
+
|
|
204
|
+
Place `upload.bat` in the same folder where you added to your search script mentioned above PATH (or any folder in your PATH):
|
|
205
|
+
|
|
206
|
+
```batch
|
|
207
|
+
@echo off
|
|
208
|
+
if "%~1"=="" (
|
|
209
|
+
echo Usage: upload.bat "full\path\to\file.mp4"
|
|
210
|
+
exit /b 1
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
set "FILE=%~1"
|
|
214
|
+
set "REMOTE=http://192.168.1.222/upload.json"
|
|
215
|
+
|
|
216
|
+
curl --progress-bar -F "file=@%FILE%" %REMOTE% -o NUL
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**Note:** Replace `192.168.1.222` with your device's actual IP address.
|
|
220
|
+
|
|
221
|
+
### Usage
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
upload "C:\Users\YourName\Downloads\movie.mp4"
|
|
225
|
+
```
|
|
226
|
+
|
|
182
227
|
## Author
|
|
183
228
|
|
|
184
229
|
Sedat ERGOZ [@eaeoz](https://github.com/eaeoz)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../src/cli/display.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../src/cli/display.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAiEzC,wBAAgB,cAAc,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,IAAI,CAmC7D;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAYhE;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAElD;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEpD;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEjD"}
|
package/dist/cli/display.js
CHANGED
|
@@ -10,6 +10,72 @@ exports.displaySuccess = displaySuccess;
|
|
|
10
10
|
exports.displayInfo = displayInfo;
|
|
11
11
|
const chalk_1 = __importDefault(require("chalk"));
|
|
12
12
|
chalk_1.default.level = 1;
|
|
13
|
+
function isWideChar(code) {
|
|
14
|
+
if (code > 0xFFFF)
|
|
15
|
+
return true;
|
|
16
|
+
if (code > 255)
|
|
17
|
+
return true;
|
|
18
|
+
if (code >= 0x1100 && code <= 0x115F)
|
|
19
|
+
return true;
|
|
20
|
+
if (code >= 0x2329 && code <= 0x232A)
|
|
21
|
+
return true;
|
|
22
|
+
if (code >= 0x2E80 && code <= 0x303E)
|
|
23
|
+
return true;
|
|
24
|
+
if (code >= 0x3040 && code <= 0xA4CF)
|
|
25
|
+
return true;
|
|
26
|
+
if (code >= 0xAC00 && code <= 0xD7A3)
|
|
27
|
+
return true;
|
|
28
|
+
if (code >= 0xF900 && code <= 0xFAFF)
|
|
29
|
+
return true;
|
|
30
|
+
if (code >= 0xFE10 && code <= 0xFE19)
|
|
31
|
+
return true;
|
|
32
|
+
if (code >= 0xFE30 && code <= 0xFE6F)
|
|
33
|
+
return true;
|
|
34
|
+
if (code >= 0xFF00 && code <= 0xFF60)
|
|
35
|
+
return true;
|
|
36
|
+
if (code >= 0xFFE0 && code <= 0xFFE6)
|
|
37
|
+
return true;
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
function displayWidth(str) {
|
|
41
|
+
let width = 0;
|
|
42
|
+
for (const char of str) {
|
|
43
|
+
const cp = char.codePointAt(0);
|
|
44
|
+
width += isWideChar(cp) ? 2 : 1;
|
|
45
|
+
}
|
|
46
|
+
return width;
|
|
47
|
+
}
|
|
48
|
+
function truncateWide(str, maxWidth) {
|
|
49
|
+
let width = 0;
|
|
50
|
+
let result = '';
|
|
51
|
+
for (const char of str) {
|
|
52
|
+
const cp = char.codePointAt(0);
|
|
53
|
+
const charWidth = isWideChar(cp) ? 2 : 1;
|
|
54
|
+
if (width + charWidth > maxWidth - 3)
|
|
55
|
+
break;
|
|
56
|
+
result += char;
|
|
57
|
+
width += charWidth;
|
|
58
|
+
}
|
|
59
|
+
return result + '...';
|
|
60
|
+
}
|
|
61
|
+
function padEndWide(str, targetWidth) {
|
|
62
|
+
const currentWidth = displayWidth(str);
|
|
63
|
+
const padding = targetWidth - currentWidth;
|
|
64
|
+
if (padding <= 0)
|
|
65
|
+
return str;
|
|
66
|
+
return str + ' '.repeat(padding);
|
|
67
|
+
}
|
|
68
|
+
function padEndWideExtra(str, targetWidth) {
|
|
69
|
+
const currentWidth = displayWidth(str);
|
|
70
|
+
const padding = targetWidth - currentWidth;
|
|
71
|
+
if (padding < 0) {
|
|
72
|
+
if ([...str].some(c => c.codePointAt(0) > 255)) {
|
|
73
|
+
return str + ' ';
|
|
74
|
+
}
|
|
75
|
+
return str;
|
|
76
|
+
}
|
|
77
|
+
return str + ' '.repeat(padding);
|
|
78
|
+
}
|
|
13
79
|
function makeClickable(url, text) {
|
|
14
80
|
return `\u001b]8;;${url}\u0007${text}\u001b]8;;\u0007`;
|
|
15
81
|
}
|
|
@@ -25,7 +91,7 @@ function displayResults(results) {
|
|
|
25
91
|
'├─────┼───┼──────────────────────────────────────────────────────────────────────────────────┼────────┼───────┼───────┼────────┤'
|
|
26
92
|
].join('\n'));
|
|
27
93
|
for (const r of results) {
|
|
28
|
-
const name = r.name
|
|
94
|
+
const name = displayWidth(r.name) > 80 ? truncateWide(r.name, 80) : r.name;
|
|
29
95
|
const size = r.size ? r.size.slice(0, 6).padEnd(6) : 'N/A ';
|
|
30
96
|
const seeds = r.seeds > 100 ? chalk_1.default.green(r.seeds.toString().padStart(5)) : r.seeds > 50 ? chalk_1.default.yellow(r.seeds.toString().padStart(5)) : r.seeds.toString().padStart(5);
|
|
31
97
|
const peers = r.peers > 50 ? chalk_1.default.cyan(r.peers.toString().padStart(5)) : r.peers.toString().padStart(5);
|
|
@@ -33,7 +99,7 @@ function displayResults(results) {
|
|
|
33
99
|
const num = chalk_1.default.cyan(r.num.toString().padStart(3));
|
|
34
100
|
const url = r.torrentUrl || r.magnet || '';
|
|
35
101
|
const pageUrl = r.url || '';
|
|
36
|
-
const clickableName = url ? makeClickable(url, name
|
|
102
|
+
const clickableName = url ? makeClickable(url, padEndWideExtra(name, 80)) : padEndWideExtra(name, 80);
|
|
37
103
|
const clickableLink = pageUrl ? makeClickable(pageUrl, chalk_1.default.green('✓')) : chalk_1.default.gray(' ');
|
|
38
104
|
out(`│ ${num} │ ${clickableLink} │ ${clickableName} │ ${size} │ ${seeds} │ ${peers} │ ${source} │`);
|
|
39
105
|
}
|
package/dist/cli/display.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display.js","sourceRoot":"","sources":["../../src/cli/display.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"display.js","sourceRoot":"","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ACtD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IACnD,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAClB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,eAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;IAC7F,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC,CAAC;AACtD,CAAC;AAED,SAAgB,YAAY,CAAC,OAAe;IAC1C,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,CAAC;AAChD,CAAC;AAED,SAAgB,cAAc,CAAC,OAAe;IAC5C,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC;AAC3C,CAAC;AAED,SAAgB,WAAW,CAAC,OAAe;IACzC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC;AAC1C,CAAC"}
|
package/dist/sources/yts.js
CHANGED
|
@@ -34,7 +34,7 @@ class YtsScraper {
|
|
|
34
34
|
seeds: movie.torrents?.[0]?.seeds || 0,
|
|
35
35
|
peers: movie.torrents?.[0]?.peers || 0,
|
|
36
36
|
source: 'YTS',
|
|
37
|
-
url: movie.
|
|
37
|
+
url: movie.url || '',
|
|
38
38
|
torrentUrl: movie.torrents?.[0]?.url || '',
|
|
39
39
|
magnet: movie.torrents?.[0]?.hash ? `magnet:?xt=urn:btih:${movie.torrents[0].hash}` : '',
|
|
40
40
|
hash: movie.torrents?.[0]?.hash
|
package/dist/sources/yts.js.map
CHANGED
|
@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C,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;QAClE,IAAI,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI;YAAE,OAAO,CAAC,KAAK,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;QAClF,OAAO,CAAC,KAAK,GAAG,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC;IAC3D,CAAC;CACF;AA9ED,gCA8EC;AAED,kBAAe,IAAI,UAAU,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "tor-dl",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "CLI torrent search tool - search, open in browser, copy magnet links",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"tor-dl": "dist/bin/tor-dl.js"
|
|
8
|
-
},
|
|
9
|
-
"scripts": {
|
|
10
|
-
"build": "tsc && node scripts/build.js",
|
|
11
|
-
"start": "node dist/bin/tor-dl.js"
|
|
12
|
-
},
|
|
13
|
-
"dependencies": {
|
|
14
|
-
"axios": "^1.6.0",
|
|
15
|
-
"chalk": "^4.1.2",
|
|
16
|
-
"cheerio": "^1.0.0-rc.12",
|
|
17
|
-
"commander": "^11.1.0",
|
|
18
|
-
"ora": "^6.3.1"
|
|
19
|
-
},
|
|
20
|
-
"devDependencies": {
|
|
21
|
-
"@types/node": "^20.10.0",
|
|
22
|
-
"typescript": "^5.3.0"
|
|
23
|
-
},
|
|
24
|
-
"engines": {
|
|
25
|
-
"node": ">=18.0.0"
|
|
26
|
-
},
|
|
27
|
-
"keywords": ["tor-dl", "torrent", "downloader"],
|
|
28
|
-
"author": "Sedat ERGOZ",
|
|
29
|
-
"license": "ISC",
|
|
30
|
-
"repository": {
|
|
31
|
-
"type": "git",
|
|
32
|
-
"url": "git+https://github.com/eaeoz/tor-dl.git"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "tor-dl",
|
|
3
|
+
"version": "1.0.15",
|
|
4
|
+
"description": "CLI torrent search tool - search, open in browser, copy magnet links",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"tor-dl": "dist/bin/tor-dl.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc && node scripts/build.js",
|
|
11
|
+
"start": "node dist/bin/tor-dl.js"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"axios": "^1.6.0",
|
|
15
|
+
"chalk": "^4.1.2",
|
|
16
|
+
"cheerio": "^1.0.0-rc.12",
|
|
17
|
+
"commander": "^11.1.0",
|
|
18
|
+
"ora": "^6.3.1"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@types/node": "^20.10.0",
|
|
22
|
+
"typescript": "^5.3.0"
|
|
23
|
+
},
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=18.0.0"
|
|
26
|
+
},
|
|
27
|
+
"keywords": ["tor-dl", "torrent", "downloader"],
|
|
28
|
+
"author": "Sedat ERGOZ",
|
|
29
|
+
"license": "ISC",
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "git+https://github.com/eaeoz/tor-dl.git"
|
|
33
|
+
}
|
|
34
|
+
}
|
package/src/cli/display.ts
CHANGED
|
@@ -3,6 +3,63 @@ import { TorrentResult } from '../types';
|
|
|
3
3
|
|
|
4
4
|
(chalk as any).level = 1;
|
|
5
5
|
|
|
6
|
+
function isWideChar(code: number): boolean {
|
|
7
|
+
if (code > 0xFFFF) return true;
|
|
8
|
+
if (code > 255) return true;
|
|
9
|
+
if (code >= 0x1100 && code <= 0x115F) return true;
|
|
10
|
+
if (code >= 0x2329 && code <= 0x232A) return true;
|
|
11
|
+
if (code >= 0x2E80 && code <= 0x303E) return true;
|
|
12
|
+
if (code >= 0x3040 && code <= 0xA4CF) return true;
|
|
13
|
+
if (code >= 0xAC00 && code <= 0xD7A3) return true;
|
|
14
|
+
if (code >= 0xF900 && code <= 0xFAFF) return true;
|
|
15
|
+
if (code >= 0xFE10 && code <= 0xFE19) return true;
|
|
16
|
+
if (code >= 0xFE30 && code <= 0xFE6F) return true;
|
|
17
|
+
if (code >= 0xFF00 && code <= 0xFF60) return true;
|
|
18
|
+
if (code >= 0xFFE0 && code <= 0xFFE6) return true;
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function displayWidth(str: string): number {
|
|
23
|
+
let width = 0;
|
|
24
|
+
for (const char of str) {
|
|
25
|
+
const cp = char.codePointAt(0)!;
|
|
26
|
+
width += isWideChar(cp) ? 2 : 1;
|
|
27
|
+
}
|
|
28
|
+
return width;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function truncateWide(str: string, maxWidth: number): string {
|
|
32
|
+
let width = 0;
|
|
33
|
+
let result = '';
|
|
34
|
+
for (const char of str) {
|
|
35
|
+
const cp = char.codePointAt(0)!;
|
|
36
|
+
const charWidth = isWideChar(cp) ? 2 : 1;
|
|
37
|
+
if (width + charWidth > maxWidth - 3) break;
|
|
38
|
+
result += char;
|
|
39
|
+
width += charWidth;
|
|
40
|
+
}
|
|
41
|
+
return result + '...';
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function padEndWide(str: string, targetWidth: number): string {
|
|
45
|
+
const currentWidth = displayWidth(str);
|
|
46
|
+
const padding = targetWidth - currentWidth;
|
|
47
|
+
if (padding <= 0) return str;
|
|
48
|
+
return str + ' '.repeat(padding);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function padEndWideExtra(str: string, targetWidth: number): string {
|
|
52
|
+
const currentWidth = displayWidth(str);
|
|
53
|
+
const padding = targetWidth - currentWidth;
|
|
54
|
+
if (padding < 0) {
|
|
55
|
+
if ([...str].some(c => c.codePointAt(0)! > 255)) {
|
|
56
|
+
return str + ' ';
|
|
57
|
+
}
|
|
58
|
+
return str;
|
|
59
|
+
}
|
|
60
|
+
return str + ' '.repeat(padding);
|
|
61
|
+
}
|
|
62
|
+
|
|
6
63
|
function makeClickable(url: string, text: string): string {
|
|
7
64
|
return `\u001b]8;;${url}\u0007${text}\u001b]8;;\u0007`;
|
|
8
65
|
}
|
|
@@ -22,7 +79,7 @@ export function displayResults(results: TorrentResult[]): void {
|
|
|
22
79
|
].join('\n'));
|
|
23
80
|
|
|
24
81
|
for (const r of results) {
|
|
25
|
-
const name = r.name
|
|
82
|
+
const name = displayWidth(r.name) > 80 ? truncateWide(r.name, 80) : r.name;
|
|
26
83
|
const size = r.size ? r.size.slice(0, 6).padEnd(6) : 'N/A ';
|
|
27
84
|
const seeds = r.seeds > 100 ? chalk.green(r.seeds.toString().padStart(5)) : r.seeds > 50 ? chalk.yellow(r.seeds.toString().padStart(5)) : r.seeds.toString().padStart(5);
|
|
28
85
|
const peers = r.peers > 50 ? chalk.cyan(r.peers.toString().padStart(5)) : r.peers.toString().padStart(5);
|
|
@@ -32,7 +89,7 @@ export function displayResults(results: TorrentResult[]): void {
|
|
|
32
89
|
const url = r.torrentUrl || r.magnet || '';
|
|
33
90
|
const pageUrl = r.url || '';
|
|
34
91
|
|
|
35
|
-
const clickableName = url ? makeClickable(url, name
|
|
92
|
+
const clickableName = url ? makeClickable(url, padEndWideExtra(name, 80)) : padEndWideExtra(name, 80);
|
|
36
93
|
const clickableLink = pageUrl ? makeClickable(pageUrl, chalk.green('✓')) : chalk.gray(' ');
|
|
37
94
|
|
|
38
95
|
out(`│ ${num} │ ${clickableLink} │ ${clickableName} │ ${size} │ ${seeds} │ ${peers} │ ${source} │`);
|
package/src/sources/yts.ts
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
|
-
import * as cheerio from 'cheerio';
|
|
3
|
-
import { TorrentResult, SourceScraper } from '../types';
|
|
4
|
-
import { getHeaders, TIMEOUT } from './httpClient';
|
|
5
|
-
|
|
6
|
-
export class YtsScraper implements SourceScraper {
|
|
7
|
-
name = 'YTS';
|
|
8
|
-
|
|
9
|
-
async search(query: string, category?: string): Promise<TorrentResult[]> {
|
|
10
|
-
if (category && category.toLowerCase() === 'tv') {
|
|
11
|
-
return [];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
try {
|
|
15
|
-
const url = `https://yts.lt/api/v2/list_movies.json?query_term=${encodeURIComponent(query)}&limit=50`;
|
|
16
|
-
const { data } = await axios.get(url, {
|
|
17
|
-
headers: getHeaders(),
|
|
18
|
-
timeout: TIMEOUT
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
const results: TorrentResult[] = [];
|
|
22
|
-
|
|
23
|
-
if (data.data && data.data.movies) {
|
|
24
|
-
for (const movie of data.data.movies) {
|
|
25
|
-
const quality = movie.torrents?.[0]?.quality || 'Unknown';
|
|
26
|
-
const sizeStr = movie.torrents?.[0]?.size || '0';
|
|
27
|
-
const sizeBytes = this.parseSizeStr(sizeStr);
|
|
28
|
-
results.push({
|
|
29
|
-
num: results.length + 1,
|
|
30
|
-
name: `${movie.title} (${movie.year}) ${quality}`,
|
|
31
|
-
size: this.formatSize(sizeBytes),
|
|
32
|
-
sizeBytes: sizeBytes,
|
|
33
|
-
seeds: movie.torrents?.[0]?.seeds || 0,
|
|
34
|
-
peers: movie.torrents?.[0]?.peers || 0,
|
|
35
|
-
source: 'YTS',
|
|
36
|
-
url: movie.
|
|
37
|
-
torrentUrl: movie.torrents?.[0]?.url || '',
|
|
38
|
-
magnet: movie.torrents?.[0]?.hash ? `magnet:?xt=urn:btih:${movie.torrents[0].hash}` : '',
|
|
39
|
-
hash: movie.torrents?.[0]?.hash
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return results;
|
|
45
|
-
} catch (error: unknown) {
|
|
46
|
-
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
47
|
-
console.error(`YTS search error: ${message}`);
|
|
48
|
-
return [];
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
async getTorrentUrl(result: TorrentResult): Promise<string> {
|
|
53
|
-
return result.url;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
async getMagnet(result: TorrentResult): Promise<string> {
|
|
57
|
-
return result.magnet || '';
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
private parseSizeStr(sizeStr: string): number {
|
|
61
|
-
if (!sizeStr || typeof sizeStr !== 'string') return 0;
|
|
62
|
-
const match = sizeStr.match(/([\d.]+)\s*(GB|MB|KB|TB)/i);
|
|
63
|
-
if (!match) return 0;
|
|
64
|
-
const value = parseFloat(match[1]);
|
|
65
|
-
const unit = match[2].toUpperCase();
|
|
66
|
-
const multipliers: Record<string, number> = {
|
|
67
|
-
'KB': 1024,
|
|
68
|
-
'MB': 1024 ** 2,
|
|
69
|
-
'GB': 1024 ** 3,
|
|
70
|
-
'TB': 1024 ** 4
|
|
71
|
-
};
|
|
72
|
-
return value * (multipliers[unit] || 0);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
private formatSize(bytes: number): string {
|
|
76
|
-
if (typeof bytes !== 'number' || isNaN(bytes) || bytes === 0) {
|
|
77
|
-
return 'Unknown';
|
|
78
|
-
}
|
|
79
|
-
if (bytes < 1024) return (bytes / 1024).toFixed(2) + ' KB';
|
|
80
|
-
if (bytes < 1024 * 1024) return (bytes / 1024).toFixed(2) + ' KB';
|
|
81
|
-
if (bytes < 1024 * 1024 * 1024) return (bytes / (1024 * 1024)).toFixed(2) + ' MB';
|
|
82
|
-
return (bytes / (1024 * 1024 * 1024)).toFixed(2) + ' GB';
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import * as cheerio from 'cheerio';
|
|
3
|
+
import { TorrentResult, SourceScraper } from '../types';
|
|
4
|
+
import { getHeaders, TIMEOUT } from './httpClient';
|
|
5
|
+
|
|
6
|
+
export class YtsScraper implements SourceScraper {
|
|
7
|
+
name = 'YTS';
|
|
8
|
+
|
|
9
|
+
async search(query: string, category?: string): Promise<TorrentResult[]> {
|
|
10
|
+
if (category && category.toLowerCase() === 'tv') {
|
|
11
|
+
return [];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
try {
|
|
15
|
+
const url = `https://yts.lt/api/v2/list_movies.json?query_term=${encodeURIComponent(query)}&limit=50`;
|
|
16
|
+
const { data } = await axios.get(url, {
|
|
17
|
+
headers: getHeaders(),
|
|
18
|
+
timeout: TIMEOUT
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const results: TorrentResult[] = [];
|
|
22
|
+
|
|
23
|
+
if (data.data && data.data.movies) {
|
|
24
|
+
for (const movie of data.data.movies) {
|
|
25
|
+
const quality = movie.torrents?.[0]?.quality || 'Unknown';
|
|
26
|
+
const sizeStr = movie.torrents?.[0]?.size || '0';
|
|
27
|
+
const sizeBytes = this.parseSizeStr(sizeStr);
|
|
28
|
+
results.push({
|
|
29
|
+
num: results.length + 1,
|
|
30
|
+
name: `${movie.title} (${movie.year}) ${quality}`,
|
|
31
|
+
size: this.formatSize(sizeBytes),
|
|
32
|
+
sizeBytes: sizeBytes,
|
|
33
|
+
seeds: movie.torrents?.[0]?.seeds || 0,
|
|
34
|
+
peers: movie.torrents?.[0]?.peers || 0,
|
|
35
|
+
source: 'YTS',
|
|
36
|
+
url: movie.url || '',
|
|
37
|
+
torrentUrl: movie.torrents?.[0]?.url || '',
|
|
38
|
+
magnet: movie.torrents?.[0]?.hash ? `magnet:?xt=urn:btih:${movie.torrents[0].hash}` : '',
|
|
39
|
+
hash: movie.torrents?.[0]?.hash
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return results;
|
|
45
|
+
} catch (error: unknown) {
|
|
46
|
+
const message = error instanceof Error ? error.message : 'Unknown error';
|
|
47
|
+
console.error(`YTS search error: ${message}`);
|
|
48
|
+
return [];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async getTorrentUrl(result: TorrentResult): Promise<string> {
|
|
53
|
+
return result.url;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async getMagnet(result: TorrentResult): Promise<string> {
|
|
57
|
+
return result.magnet || '';
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
private parseSizeStr(sizeStr: string): number {
|
|
61
|
+
if (!sizeStr || typeof sizeStr !== 'string') return 0;
|
|
62
|
+
const match = sizeStr.match(/([\d.]+)\s*(GB|MB|KB|TB)/i);
|
|
63
|
+
if (!match) return 0;
|
|
64
|
+
const value = parseFloat(match[1]);
|
|
65
|
+
const unit = match[2].toUpperCase();
|
|
66
|
+
const multipliers: Record<string, number> = {
|
|
67
|
+
'KB': 1024,
|
|
68
|
+
'MB': 1024 ** 2,
|
|
69
|
+
'GB': 1024 ** 3,
|
|
70
|
+
'TB': 1024 ** 4
|
|
71
|
+
};
|
|
72
|
+
return value * (multipliers[unit] || 0);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
private formatSize(bytes: number): string {
|
|
76
|
+
if (typeof bytes !== 'number' || isNaN(bytes) || bytes === 0) {
|
|
77
|
+
return 'Unknown';
|
|
78
|
+
}
|
|
79
|
+
if (bytes < 1024) return (bytes / 1024).toFixed(2) + ' KB';
|
|
80
|
+
if (bytes < 1024 * 1024) return (bytes / 1024).toFixed(2) + ' KB';
|
|
81
|
+
if (bytes < 1024 * 1024 * 1024) return (bytes / (1024 * 1024)).toFixed(2) + ' MB';
|
|
82
|
+
return (bytes / (1024 * 1024 * 1024)).toFixed(2) + ' GB';
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
86
|
export default new YtsScraper();
|
package/dist/cli/progress.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare class DownloadProgress {
|
|
2
|
-
private bar;
|
|
3
|
-
private startTime;
|
|
4
|
-
private totalBytes;
|
|
5
|
-
private downloadedBytes;
|
|
6
|
-
constructor();
|
|
7
|
-
start(total: number): void;
|
|
8
|
-
update(downloaded: number, total: number): void;
|
|
9
|
-
private calculateSpeed;
|
|
10
|
-
private calculateETA;
|
|
11
|
-
private formatBytes;
|
|
12
|
-
stop(): void;
|
|
13
|
-
getTotalDownloaded(): number;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/cli/progress.ts"],"names":[],"mappings":"AAGA,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,GAAG,CAAwB;IACnC,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,eAAe,CAAa;;IAcpC,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAQ1B,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAe/C,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,YAAY;IAapB,OAAO,CAAC,WAAW;IAOnB,IAAI,IAAI,IAAI;IAIZ,kBAAkB,IAAI,MAAM;CAG7B"}
|
package/dist/cli/progress.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.DownloadProgress = void 0;
|
|
7
|
-
const cli_progress_1 = __importDefault(require("cli-progress"));
|
|
8
|
-
class DownloadProgress {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.totalBytes = 0;
|
|
11
|
-
this.downloadedBytes = 0;
|
|
12
|
-
this.startTime = Date.now();
|
|
13
|
-
this.bar = new cli_progress_1.default.SingleBar({
|
|
14
|
-
format: '[{bar}] {percentage}% | {speed} | ETA: {eta} | {downloaded}',
|
|
15
|
-
barCompleteChar: '\u2588',
|
|
16
|
-
barIncompleteChar: '\u2591',
|
|
17
|
-
hideCursor: true,
|
|
18
|
-
fps: 10,
|
|
19
|
-
etaAsynchronous: true
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
start(total) {
|
|
23
|
-
this.totalBytes = total;
|
|
24
|
-
this.bar.start(total, 0, {
|
|
25
|
-
speed: '0 B/s',
|
|
26
|
-
downloaded: '0 MB'
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
update(downloaded, total) {
|
|
30
|
-
this.downloadedBytes = downloaded;
|
|
31
|
-
this.totalBytes = total || this.totalBytes;
|
|
32
|
-
const speed = this.calculateSpeed();
|
|
33
|
-
const eta = this.calculateETA();
|
|
34
|
-
const downloadedMB = (this.downloadedBytes / (1024 * 1024)).toFixed(2);
|
|
35
|
-
this.bar.update(this.downloadedBytes, {
|
|
36
|
-
speed,
|
|
37
|
-
downloaded: `${downloadedMB} MB`,
|
|
38
|
-
eta
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
calculateSpeed() {
|
|
42
|
-
const elapsed = (Date.now() - this.startTime) / 1000;
|
|
43
|
-
const bytesPerSecond = elapsed > 0 ? this.downloadedBytes / elapsed : 0;
|
|
44
|
-
return this.formatBytes(bytesPerSecond) + '/s';
|
|
45
|
-
}
|
|
46
|
-
calculateETA() {
|
|
47
|
-
const elapsed = (Date.now() - this.startTime) / 1000;
|
|
48
|
-
if (this.downloadedBytes === 0 || this.totalBytes === 0)
|
|
49
|
-
return 'N/A';
|
|
50
|
-
const speed = this.downloadedBytes / elapsed;
|
|
51
|
-
const remaining = this.totalBytes - this.downloadedBytes;
|
|
52
|
-
const seconds = remaining / speed;
|
|
53
|
-
if (seconds < 60)
|
|
54
|
-
return `${Math.round(seconds)}s`;
|
|
55
|
-
if (seconds < 3600)
|
|
56
|
-
return `${Math.floor(seconds / 60)}m ${Math.round(seconds % 60)}s`;
|
|
57
|
-
return `${Math.floor(seconds / 3600)}h ${Math.floor((seconds % 3600) / 60)}m`;
|
|
58
|
-
}
|
|
59
|
-
formatBytes(bytes) {
|
|
60
|
-
if (bytes < 1024)
|
|
61
|
-
return bytes + ' B';
|
|
62
|
-
if (bytes < 1024 * 1024)
|
|
63
|
-
return (bytes / 1024).toFixed(2) + ' KB';
|
|
64
|
-
if (bytes < 1024 * 1024 * 1024)
|
|
65
|
-
return (bytes / (1024 * 1024)).toFixed(2) + ' MB';
|
|
66
|
-
return (bytes / (1024 * 1024 * 1024)).toFixed(2) + ' GB';
|
|
67
|
-
}
|
|
68
|
-
stop() {
|
|
69
|
-
this.bar.stop();
|
|
70
|
-
}
|
|
71
|
-
getTotalDownloaded() {
|
|
72
|
-
return this.downloadedBytes;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
exports.DownloadProgress = DownloadProgress;
|
|
76
|
-
//# sourceMappingURL=progress.js.map
|
package/dist/cli/progress.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"progress.js","sourceRoot":"","sources":["../../src/cli/progress.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAuC;AAGvC,MAAa,gBAAgB;IAM3B;QAHQ,eAAU,GAAW,CAAC,CAAC;QACvB,oBAAe,GAAW,CAAC,CAAC;QAGlC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC5B,IAAI,CAAC,GAAG,GAAG,IAAI,sBAAW,CAAC,SAAS,CAAC;YACnC,MAAM,EAAE,6DAA6D;YACrE,eAAe,EAAE,QAAQ;YACzB,iBAAiB,EAAE,QAAQ;YAC3B,UAAU,EAAE,IAAI;YAChB,GAAG,EAAE,EAAE;YACP,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC;IACL,CAAC;IAED,KA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IAClB,CAAC;IAED,kBAAkB;QAChB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;CACF;AA1ED,4CA0EC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TorrentResult } from '../types';
|
|
2
|
-
export declare function displayResults(results: TorrentResult[]): void;
|
|
3
|
-
export declare function displayResultDetails(result: TorrentResult): void;
|
|
4
|
-
export declare function displayError(message: string): void;
|
|
5
|
-
export declare function displaySuccess(message: string): void;
|
|
6
|
-
export declare function displayInfo(message: string): void;
|
|
7
|
-
//# sourceMappingURL=display.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../../src/cli/display.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,wBAAgB,cAAc,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,IAAI,CA6B7D;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAYhE;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAElD;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEpD;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEjD"}
|