log: toloka magnet
This commit is contained in:
1 parent
4f4e6b1307
commit
3792e3face
6 files changed
+474
-4
No files matched your search
@@ -2,6 +2,8 @@ import axios, { AxiosInstance } from 'axios';
|
||||
import torrentTitle from 'parse-torrent-title';
|
||||
import { load } from 'cheerio';
|
||||
|
||||
import parseTorrent from 'parse-torrent';
|
||||
|
||||
import { CookieJar } from 'tough-cookie';
|
||||
import { wrapper } from 'axios-cookiejar-support';
|
||||
|
||||
@@ -15,7 +17,9 @@ export class Toloka {
|
||||
[Sort.seeds]: 10
|
||||
};
|
||||
|
||||
cookieJar = new CookieJar();
|
||||
private cookieJar = new CookieJar();
|
||||
|
||||
private magnets: Record<string, string> = {};
|
||||
|
||||
constructor() {
|
||||
this.host = process.env.TOLOKA_HOST || 'https://toloka.to';
|
||||
@@ -29,11 +33,11 @@ export class Toloka {
|
||||
);
|
||||
}
|
||||
|
||||
async isAuthorized(data: string) {
|
||||
private async isAuthorized(data: string) {
|
||||
return !load(data)('[href="/login.php"]').length;
|
||||
}
|
||||
|
||||
async auth() {
|
||||
private async auth() {
|
||||
const data = new FormData();
|
||||
|
||||
data.append('username', process.env.TOLOKA_USERNAME as string);
|
||||
@@ -79,7 +83,7 @@ export class Toloka {
|
||||
seeders: parseInt(seeders || '0'),
|
||||
quality: resolution,
|
||||
magnet: '',
|
||||
download: sid ? `${this.host}/${download}&sid=${sid}` : ''
|
||||
download
|
||||
};
|
||||
})
|
||||
.get();
|
||||
@@ -95,6 +99,22 @@ export class Toloka {
|
||||
|
||||
return parseTorrents(page.data);
|
||||
}
|
||||
|
||||
async magnet(url: string) {
|
||||
if (this.magnets[url]) return this.magnets[url];
|
||||
|
||||
const { data: buffer } = await this.client.get(`/${url}`, {
|
||||
responseType: 'arraybuffer'
|
||||
});
|
||||
|
||||
const torrent = await parseTorrent(buffer);
|
||||
|
||||
const magnet = `magnet:?xt=urn:btih:${torrent.infoHash}&dn=${encodeURIComponent(torrent.name?.toString() || '')}`;
|
||||
|
||||
this.magnets[url] = magnet;
|
||||
|
||||
return this.magnets[url];
|
||||
}
|
||||
}
|
||||
|
||||
const parser = new Toloka();
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import { NextRequest, NextResponse } from 'next/server';
|
||||
|
||||
import tlk from '@/api/parsers/tlk';
|
||||
|
||||
export async function GET({ nextUrl: { searchParams } }: NextRequest) {
|
||||
const url = searchParams.get('url') as string;
|
||||
|
||||
try {
|
||||
return NextResponse.json(await tlk.magnet(url));
|
||||
} catch (_) {
|
||||
console.log('error', _);
|
||||
return NextResponse.json([]);
|
||||
}
|
||||
}
|
||||
+15
@@ -4,12 +4,15 @@ import { Cast, ListVideo, Magnet, Play } from 'lucide-react';
|
||||
import { Quality } from '@/api/parsers/yts/models';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import ButtonsGroup from '@/components/ui/buttons-group';
|
||||
import { toast, useToast } from '@/hooks/useToast';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
import { providers } from '../../../../constants';
|
||||
import { useCastMagnet, usePrefix } from '../../../../hooks/useMagnetHosts';
|
||||
import showPlayer from '../../../Player';
|
||||
|
||||
import useMagnet from './useMagnet';
|
||||
|
||||
interface Props {
|
||||
torrent: Torrent;
|
||||
backdrop: string;
|
||||
@@ -21,6 +24,8 @@ const Actions: FC<Props> = ({ torrent, backdrop, title, provider }) => {
|
||||
const prefix = usePrefix();
|
||||
const cast = useCastMagnet();
|
||||
|
||||
const { toast } = useToast();
|
||||
|
||||
const supportedForStream = Boolean(
|
||||
(provider === providers.yts.key &&
|
||||
torrent.seeders &&
|
||||
@@ -28,6 +33,8 @@ const Actions: FC<Props> = ({ torrent, backdrop, title, provider }) => {
|
||||
torrent.container?.includes('mp4')
|
||||
);
|
||||
|
||||
const magnet = useMagnet(torrent);
|
||||
|
||||
const supportedForCast = prefix && !prefix.includes('{host}');
|
||||
|
||||
return (
|
||||
@@ -42,6 +49,14 @@ const Actions: FC<Props> = ({ torrent, backdrop, title, provider }) => {
|
||||
<Play size={15} />
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
variant='outline'
|
||||
className='relative grow-0 px-3'
|
||||
disabled={magnet.isPending}
|
||||
onClick={() => magnet.mutateAsync().then((magnet) => toast({ description: magnet }))}
|
||||
>
|
||||
Get magnet
|
||||
</Button>
|
||||
<Button variant='outline' className='relative grow-0 px-3' title='Play using your native video player'>
|
||||
<a
|
||||
className='absolute left-0 top-0 size-full'
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
|
||||
const useMagnet = (torrent: Torrent) => {
|
||||
return useMutation({
|
||||
mutationFn: async () =>
|
||||
torrent.magnet ? torrent.magnet : fetch(`/api/magnet?url=${torrent.download}`).then((response) => response.json())
|
||||
});
|
||||
};
|
||||
|
||||
export default useMagnet;
|
||||
Generated
+409
@@ -27,10 +27,12 @@
|
||||
"media-icons": "^1.1.5",
|
||||
"next": "^14.2.7",
|
||||
"next-pwa": "^5.6.0",
|
||||
"parse-torrent": "^11.0.17",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-modal-promise": "^1.0.2",
|
||||
"react-virtuoso": "^4.10.1",
|
||||
"torrent-parser": "^1.2.0",
|
||||
"tough-cookie": "^5.0.0",
|
||||
"typescript": "5.1.6"
|
||||
},
|
||||
@@ -4264,6 +4266,18 @@
|
||||
"react": "^18 || ^19"
|
||||
}
|
||||
},
|
||||
"node_modules/@thaunknown/thirty-two": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@thaunknown/thirty-two/-/thirty-two-1.0.5.tgz",
|
||||
"integrity": "sha512-Q53KyCXweV1CS62EfqtPDqfpksn5keQ59PGqzzkK+g8Vif1jB4inoBCcs/BUSdsqddhE3G+2Fn+4RX3S6RqT0A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"uint8-util": "^2.2.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.2.6"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/cheerio": {
|
||||
"version": "0.22.35",
|
||||
"resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.35.tgz",
|
||||
@@ -4684,6 +4698,18 @@
|
||||
"license": "Apache-2.0",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/abort-controller": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
||||
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"event-target-shim": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.5"
|
||||
}
|
||||
},
|
||||
"node_modules/acorn": {
|
||||
"version": "8.13.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz",
|
||||
@@ -5163,6 +5189,30 @@
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
||||
},
|
||||
"node_modules/base64-arraybuffer": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
|
||||
"integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bencode": {
|
||||
"version": "0.11.0",
|
||||
"resolved": "https://registry.npmjs.org/bencode/-/bencode-0.11.0.tgz",
|
||||
"integrity": "sha512-x6qfVFALg1uFnGXrFYtiSE429Mdt+CTLnSIQVl+ZWAFae8QE+LICbD00S2JFl8tOPVU493U9Auxf1e26Pnhxng==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/bep53-range": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bep53-range/-/bep53-range-2.0.0.tgz",
|
||||
"integrity": "sha512-sMm2sV5PRs0YOVk0LTKtjuIprVzxgTQUsrGX/7Yph2Rm4FO2Fqqtq7hNjsOB5xezM4v4+5rljCgK++UeQJZguA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12.20.0"
|
||||
}
|
||||
},
|
||||
"node_modules/big-integer": {
|
||||
"version": "1.6.51",
|
||||
"resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz",
|
||||
@@ -5606,6 +5656,16 @@
|
||||
"postcss-media-query-parser": "^0.2.3"
|
||||
}
|
||||
},
|
||||
"node_modules/cross-fetch-ponyfill": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/cross-fetch-ponyfill/-/cross-fetch-ponyfill-1.0.3.tgz",
|
||||
"integrity": "sha512-uOBkDhUAGAbx/FEzNKkOfx3w57H8xReBBXoZvUnOKTI0FW0Xvrj3GrYv2iZXUqlffC1LMGfQzhmBM/ke+6eTDA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"abort-controller": "^3.0.0",
|
||||
"node-fetch": "^3.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||
@@ -5678,6 +5738,15 @@
|
||||
"integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/data-uri-to-buffer": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
|
||||
"integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 12"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.7",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
|
||||
@@ -6682,6 +6751,15 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/event-target-shim": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
|
||||
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/events": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
|
||||
@@ -6771,6 +6849,29 @@
|
||||
"reusify": "^1.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/fetch-blob": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
|
||||
"integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/jimmywarting"
|
||||
},
|
||||
{
|
||||
"type": "paypal",
|
||||
"url": "https://paypal.me/jimmywarting"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"node-domexception": "^1.0.0",
|
||||
"web-streams-polyfill": "^3.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.20 || >= 14.13"
|
||||
}
|
||||
},
|
||||
"node_modules/file-entry-cache": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
|
||||
@@ -6944,6 +7045,18 @@
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/formdata-polyfill": {
|
||||
"version": "4.0.10",
|
||||
"resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
|
||||
"integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fetch-blob": "^3.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.20.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fraction.js": {
|
||||
"version": "4.3.7",
|
||||
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz",
|
||||
@@ -7060,6 +7173,18 @@
|
||||
"integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/get-stdin": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz",
|
||||
"integrity": "sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/get-stream": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
|
||||
@@ -8273,6 +8398,34 @@
|
||||
"sourcemap-codec": "^1.4.8"
|
||||
}
|
||||
},
|
||||
"node_modules/magnet-uri": {
|
||||
"version": "7.0.5",
|
||||
"resolved": "https://registry.npmjs.org/magnet-uri/-/magnet-uri-7.0.5.tgz",
|
||||
"integrity": "sha512-Ke+dDiYHK1Rq/ZyGUAgk7NIkoypivxolTj/A0qr60ypP0FjeP+NTUNEhr965HsRan0zGxKEBK73+SsjRyJWkXg==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@thaunknown/thirty-two": "^1.0.3",
|
||||
"bep53-range": "^2.0.0",
|
||||
"uint8-util": "^2.1.9"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.20.0"
|
||||
}
|
||||
},
|
||||
"node_modules/make-dir": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
|
||||
@@ -8511,6 +8664,43 @@
|
||||
"next": ">=9.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/node-domexception": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
|
||||
"integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/jimmywarting"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://paypal.me/jimmywarting"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/node-fetch": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",
|
||||
"integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"data-uri-to-buffer": "^4.0.0",
|
||||
"fetch-blob": "^3.1.4",
|
||||
"formdata-polyfill": "^4.0.10"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/node-fetch"
|
||||
}
|
||||
},
|
||||
"node_modules/node-releases": {
|
||||
"version": "2.0.18",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz",
|
||||
@@ -8813,6 +9003,40 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/parse-torrent": {
|
||||
"version": "11.0.17",
|
||||
"resolved": "https://registry.npmjs.org/parse-torrent/-/parse-torrent-11.0.17.tgz",
|
||||
"integrity": "sha512-bkfEtrqIMT4+bSWs+m7+Ktd7LSJsDefA9qfJQ3UFwOeBqipiQ+347guu79zX++nRwMnrdvRecLmgaRcdiYjE4w==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bencode": "^4.0.0",
|
||||
"cross-fetch-ponyfill": "^1.0.3",
|
||||
"get-stdin": "^9.0.0",
|
||||
"magnet-uri": "^7.0.5",
|
||||
"queue-microtask": "^1.2.3",
|
||||
"uint8-util": "^2.2.5"
|
||||
},
|
||||
"bin": {
|
||||
"parse-torrent": "bin/cmd.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.20.0"
|
||||
}
|
||||
},
|
||||
"node_modules/parse-torrent-title": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/parse-torrent-title/-/parse-torrent-title-1.4.0.tgz",
|
||||
@@ -8822,6 +9046,18 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/parse-torrent/node_modules/bencode": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bencode/-/bencode-4.0.0.tgz",
|
||||
"integrity": "sha512-AERXw18df0pF3ziGOCyUjqKZBVNH8HV3lBxnx5w0qtgMIk4a1wb9BkcCQbkp9Zstfrn/dzRwl7MmUHHocX3sRQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"uint8-util": "^2.2.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.20.0"
|
||||
}
|
||||
},
|
||||
"node_modules/parse5": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.0.tgz",
|
||||
@@ -10546,6 +10782,19 @@
|
||||
"node": ">=8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/torrent-parser": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/torrent-parser/-/torrent-parser-1.2.0.tgz",
|
||||
"integrity": "sha512-H/veK6VzAxV+PViQK94Kz8WPfLn8XiV9QqzK+1KhAF/QUVXeVXrKmk/Zh3SVeeSh8W5RcqZJEaobZwm00EiTKA==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"bencode": "^0.11.0",
|
||||
"lodash": "^4.17.4"
|
||||
},
|
||||
"bin": {
|
||||
"torrent-parser": "bin/torrent-parser.js"
|
||||
}
|
||||
},
|
||||
"node_modules/tough-cookie": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.0.0.tgz",
|
||||
@@ -10708,6 +10957,15 @@
|
||||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/uint8-util": {
|
||||
"version": "2.2.5",
|
||||
"resolved": "https://registry.npmjs.org/uint8-util/-/uint8-util-2.2.5.tgz",
|
||||
"integrity": "sha512-/QxVQD7CttWpVUKVPz9znO+3Dd4BdTSnFQ7pv/4drVhC9m4BaL2LFHTkJn6EsYoxT79VDq/2Gg8L0H22PrzyMw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"base64-arraybuffer": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/unbox-primitive": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz",
|
||||
@@ -10909,6 +11167,15 @@
|
||||
"node": ">=10.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/web-streams-polyfill": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",
|
||||
"integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/webidl-conversions": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
|
||||
@@ -13866,6 +14133,14 @@
|
||||
"@tanstack/query-devtools": "5.58.0"
|
||||
}
|
||||
},
|
||||
"@thaunknown/thirty-two": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@thaunknown/thirty-two/-/thirty-two-1.0.5.tgz",
|
||||
"integrity": "sha512-Q53KyCXweV1CS62EfqtPDqfpksn5keQ59PGqzzkK+g8Vif1jB4inoBCcs/BUSdsqddhE3G+2Fn+4RX3S6RqT0A==",
|
||||
"requires": {
|
||||
"uint8-util": "^2.2.5"
|
||||
}
|
||||
},
|
||||
"@types/cheerio": {
|
||||
"version": "0.22.35",
|
||||
"resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.35.tgz",
|
||||
@@ -14207,6 +14482,14 @@
|
||||
"integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
|
||||
"peer": true
|
||||
},
|
||||
"abort-controller": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
||||
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
|
||||
"requires": {
|
||||
"event-target-shim": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"acorn": {
|
||||
"version": "8.13.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz",
|
||||
@@ -14537,6 +14820,21 @@
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
||||
},
|
||||
"base64-arraybuffer": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz",
|
||||
"integrity": "sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ=="
|
||||
},
|
||||
"bencode": {
|
||||
"version": "0.11.0",
|
||||
"resolved": "https://registry.npmjs.org/bencode/-/bencode-0.11.0.tgz",
|
||||
"integrity": "sha512-x6qfVFALg1uFnGXrFYtiSE429Mdt+CTLnSIQVl+ZWAFae8QE+LICbD00S2JFl8tOPVU493U9Auxf1e26Pnhxng=="
|
||||
},
|
||||
"bep53-range": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bep53-range/-/bep53-range-2.0.0.tgz",
|
||||
"integrity": "sha512-sMm2sV5PRs0YOVk0LTKtjuIprVzxgTQUsrGX/7Yph2Rm4FO2Fqqtq7hNjsOB5xezM4v4+5rljCgK++UeQJZguA=="
|
||||
},
|
||||
"big-integer": {
|
||||
"version": "1.6.51",
|
||||
"resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz",
|
||||
@@ -14831,6 +15129,15 @@
|
||||
"postcss-media-query-parser": "^0.2.3"
|
||||
}
|
||||
},
|
||||
"cross-fetch-ponyfill": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/cross-fetch-ponyfill/-/cross-fetch-ponyfill-1.0.3.tgz",
|
||||
"integrity": "sha512-uOBkDhUAGAbx/FEzNKkOfx3w57H8xReBBXoZvUnOKTI0FW0Xvrj3GrYv2iZXUqlffC1LMGfQzhmBM/ke+6eTDA==",
|
||||
"requires": {
|
||||
"abort-controller": "^3.0.0",
|
||||
"node-fetch": "^3.3.0"
|
||||
}
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||
@@ -14881,6 +15188,11 @@
|
||||
"integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==",
|
||||
"dev": true
|
||||
},
|
||||
"data-uri-to-buffer": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
|
||||
"integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A=="
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.3.7",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
|
||||
@@ -15619,6 +15931,11 @@
|
||||
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
|
||||
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="
|
||||
},
|
||||
"event-target-shim": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
|
||||
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ=="
|
||||
},
|
||||
"events": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
|
||||
@@ -15693,6 +16010,15 @@
|
||||
"reusify": "^1.0.4"
|
||||
}
|
||||
},
|
||||
"fetch-blob": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
|
||||
"integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
|
||||
"requires": {
|
||||
"node-domexception": "^1.0.0",
|
||||
"web-streams-polyfill": "^3.0.3"
|
||||
}
|
||||
},
|
||||
"file-entry-cache": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
|
||||
@@ -15813,6 +16139,14 @@
|
||||
"mime-types": "^2.1.12"
|
||||
}
|
||||
},
|
||||
"formdata-polyfill": {
|
||||
"version": "4.0.10",
|
||||
"resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
|
||||
"integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
|
||||
"requires": {
|
||||
"fetch-blob": "^3.1.2"
|
||||
}
|
||||
},
|
||||
"fraction.js": {
|
||||
"version": "4.3.7",
|
||||
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz",
|
||||
@@ -15888,6 +16222,11 @@
|
||||
"resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz",
|
||||
"integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g=="
|
||||
},
|
||||
"get-stdin": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz",
|
||||
"integrity": "sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA=="
|
||||
},
|
||||
"get-stream": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
|
||||
@@ -16694,6 +17033,16 @@
|
||||
"sourcemap-codec": "^1.4.8"
|
||||
}
|
||||
},
|
||||
"magnet-uri": {
|
||||
"version": "7.0.5",
|
||||
"resolved": "https://registry.npmjs.org/magnet-uri/-/magnet-uri-7.0.5.tgz",
|
||||
"integrity": "sha512-Ke+dDiYHK1Rq/ZyGUAgk7NIkoypivxolTj/A0qr60ypP0FjeP+NTUNEhr965HsRan0zGxKEBK73+SsjRyJWkXg==",
|
||||
"requires": {
|
||||
"@thaunknown/thirty-two": "^1.0.3",
|
||||
"bep53-range": "^2.0.0",
|
||||
"uint8-util": "^2.1.9"
|
||||
}
|
||||
},
|
||||
"make-dir": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
|
||||
@@ -16846,6 +17195,21 @@
|
||||
"workbox-window": "^6.5.4"
|
||||
}
|
||||
},
|
||||
"node-domexception": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
|
||||
"integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ=="
|
||||
},
|
||||
"node-fetch": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",
|
||||
"integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
|
||||
"requires": {
|
||||
"data-uri-to-buffer": "^4.0.0",
|
||||
"fetch-blob": "^3.1.4",
|
||||
"formdata-polyfill": "^4.0.10"
|
||||
}
|
||||
},
|
||||
"node-releases": {
|
||||
"version": "2.0.18",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz",
|
||||
@@ -17055,6 +17419,29 @@
|
||||
"callsites": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"parse-torrent": {
|
||||
"version": "11.0.17",
|
||||
"resolved": "https://registry.npmjs.org/parse-torrent/-/parse-torrent-11.0.17.tgz",
|
||||
"integrity": "sha512-bkfEtrqIMT4+bSWs+m7+Ktd7LSJsDefA9qfJQ3UFwOeBqipiQ+347guu79zX++nRwMnrdvRecLmgaRcdiYjE4w==",
|
||||
"requires": {
|
||||
"bencode": "^4.0.0",
|
||||
"cross-fetch-ponyfill": "^1.0.3",
|
||||
"get-stdin": "^9.0.0",
|
||||
"magnet-uri": "^7.0.5",
|
||||
"queue-microtask": "^1.2.3",
|
||||
"uint8-util": "^2.2.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"bencode": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bencode/-/bencode-4.0.0.tgz",
|
||||
"integrity": "sha512-AERXw18df0pF3ziGOCyUjqKZBVNH8HV3lBxnx5w0qtgMIk4a1wb9BkcCQbkp9Zstfrn/dzRwl7MmUHHocX3sRQ==",
|
||||
"requires": {
|
||||
"uint8-util": "^2.2.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parse-torrent-title": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/parse-torrent-title/-/parse-torrent-title-1.4.0.tgz",
|
||||
@@ -18179,6 +18566,15 @@
|
||||
"is-number": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"torrent-parser": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/torrent-parser/-/torrent-parser-1.2.0.tgz",
|
||||
"integrity": "sha512-H/veK6VzAxV+PViQK94Kz8WPfLn8XiV9QqzK+1KhAF/QUVXeVXrKmk/Zh3SVeeSh8W5RcqZJEaobZwm00EiTKA==",
|
||||
"requires": {
|
||||
"bencode": "^0.11.0",
|
||||
"lodash": "^4.17.4"
|
||||
}
|
||||
},
|
||||
"tough-cookie": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.0.0.tgz",
|
||||
@@ -18298,6 +18694,14 @@
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz",
|
||||
"integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA=="
|
||||
},
|
||||
"uint8-util": {
|
||||
"version": "2.2.5",
|
||||
"resolved": "https://registry.npmjs.org/uint8-util/-/uint8-util-2.2.5.tgz",
|
||||
"integrity": "sha512-/QxVQD7CttWpVUKVPz9znO+3Dd4BdTSnFQ7pv/4drVhC9m4BaL2LFHTkJn6EsYoxT79VDq/2Gg8L0H22PrzyMw==",
|
||||
"requires": {
|
||||
"base64-arraybuffer": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"unbox-primitive": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz",
|
||||
@@ -18412,6 +18816,11 @@
|
||||
"graceful-fs": "^4.1.2"
|
||||
}
|
||||
},
|
||||
"web-streams-polyfill": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",
|
||||
"integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw=="
|
||||
},
|
||||
"webidl-conversions": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
|
||||
|
||||
@@ -29,10 +29,12 @@
|
||||
"media-icons": "^1.1.5",
|
||||
"next": "^14.2.7",
|
||||
"next-pwa": "^5.6.0",
|
||||
"parse-torrent": "^11.0.17",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-modal-promise": "^1.0.2",
|
||||
"react-virtuoso": "^4.10.1",
|
||||
"torrent-parser": "^1.2.0",
|
||||
"tough-cookie": "^5.0.0",
|
||||
"typescript": "5.1.6"
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user