torrent-online 1.4.4 → 1.4.6
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 +17 -1
- package/package.json +1 -1
- package/wtui.js +5 -3
package/README.md
CHANGED
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
|
|
14
14
|
## Быстрый старт
|
|
15
15
|
```bash
|
|
16
|
+
npx torrent-online
|
|
17
|
+
```
|
|
18
|
+
Глобально один раз:
|
|
19
|
+
```bash
|
|
20
|
+
npm i -g torrent-online && torrent-online
|
|
21
|
+
```
|
|
22
|
+
Из исходников:
|
|
23
|
+
```bash
|
|
16
24
|
git clone https://github.com/IamCaptainPepe/torrent-online.git
|
|
17
25
|
cd torrent-online
|
|
18
26
|
npm i
|
|
@@ -92,7 +100,15 @@ docker run -p 8123:8123 torrent-online node wtui.js "magnet:?xt=..." --lan --no-
|
|
|
92
100
|
|
|
93
101
|
# English
|
|
94
102
|
|
|
95
|
-
## Quick
|
|
103
|
+
## Quick Start
|
|
104
|
+
```bash
|
|
105
|
+
npx torrent-online
|
|
106
|
+
```
|
|
107
|
+
Install globally:
|
|
108
|
+
```bash
|
|
109
|
+
npm i -g torrent-online && torrent-online
|
|
110
|
+
```
|
|
111
|
+
From source:
|
|
96
112
|
```bash
|
|
97
113
|
git clone https://github.com/IamCaptainPepe/torrent-online.git
|
|
98
114
|
cd torrent-online
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "torrent-online",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Stream .torrent / magnet to VLC or browser — torrent streaming for macOS/Linux without a torrent client. Стрим торрентов в VLC или браузер.",
|
|
6
6
|
"keywords": [
|
package/wtui.js
CHANGED
|
@@ -262,7 +262,7 @@ function translit(s) { return s.toLowerCase().split('').map(c => TRANSLIT[c] ??
|
|
|
262
262
|
function btihKey(mag) { const m = /btih:([0-9a-fA-F]{40}|[0-9a-fA-F]{32})/.exec(mag); return m ? m[1].toLowerCase() : mag.slice(0, 90); }
|
|
263
263
|
|
|
264
264
|
async function search1337x(q) {
|
|
265
|
-
const r = await fetch(`https://1337x.st/api/v1/search/${encodeURIComponent(q)}/1/1/`, {
|
|
265
|
+
const r = await fetch(`https://1337x.st/api/v1/search/${encodeURIComponent(q)}/1/1/1/0/`, {
|
|
266
266
|
headers: { 'x-api-key': 'sk1337x73871873371873', 'user-agent': UA, accept: 'application/json' },
|
|
267
267
|
signal: AbortSignal.timeout(9000),
|
|
268
268
|
});
|
|
@@ -280,7 +280,7 @@ async function search1337x(q) {
|
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
async function searchTPB(q, host = 'https://tpb.party') {
|
|
283
|
-
const r = await fetch(`${host}/
|
|
283
|
+
const r = await fetch(`${host}/search/${encodeURIComponent(q)}/0/99/200/`, {
|
|
284
284
|
headers: { 'user-agent': UA },
|
|
285
285
|
signal: AbortSignal.timeout(9000),
|
|
286
286
|
});
|
|
@@ -307,12 +307,14 @@ async function searchRutor(q) {
|
|
|
307
307
|
});
|
|
308
308
|
if (!r.ok) throw new Error(`Rutor: HTTP ${r.status}`);
|
|
309
309
|
const xml = await r.text();
|
|
310
|
+
const VIDEO = /фильм|сериал|мультип|аниме|телевизор|документ|спорт/i;
|
|
310
311
|
const out = [];
|
|
311
312
|
for (const item of xml.split('<item>').slice(1, 26)) {
|
|
312
313
|
const title = decodeXml(/<title>([^<]*)<\/title>/.exec(item)?.[1] || '')
|
|
313
314
|
.replace(/\s*\([^()]*\.torrent\)\s*$/, '');
|
|
315
|
+
const cat = decodeXml(/<description>([^<]*)<\/description>/.exec(item)?.[1] || '');
|
|
314
316
|
const link = /<link>([^<]+)<\/link>/.exec(item)?.[1] || '';
|
|
315
|
-
if (title && link.includes('download.php'))
|
|
317
|
+
if (title && link.includes('download.php') && VIDEO.test(cat))
|
|
316
318
|
out.push({ name: title, mag: link, size: '', seeds: 0, src: 'Rutor' });
|
|
317
319
|
}
|
|
318
320
|
return out;
|