feat(torrents): series parsing, S:E/Year columns, magnet cache

- parse Toloka Ukrainian season/episode naming (Сезони 1-10,
  серій 7 з 8, homoglyphs) into a clean title + episodes field
- add series-only sortable S:E column, desktop-only Year column;
  strip year/source meta from the title cell
- filter out torrents with fewer than 5 seeders in the API route
- cache Toloka magnets in Redis so each .torrent is downloaded once
  across serverless instances; append public trackers to magnets
  (never the passkey-bearing announce URLs from the .torrent)
- fix play button hover state while magnet is pending

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
nerandClaude Fable 5 committed 2026-08-06 22:14:58 +03:00
1 parent 131beeb07f
commit 2e81908b22
9 files changed
+163 -34

No files matched your search

+2 -13
View File
@@ -2,7 +2,7 @@ import axios, { AxiosInstance } from 'axios';
import { YTS_HOST } from '@/env';
import { Sort } from '../index';
import { Sort, TRACKERS } from '../index';
import { YTSResponse } from './models';
@@ -42,17 +42,6 @@ export class YTS {
return (
movie?.torrents.map((torrent) => {
const trackers = [
'udp://open.demonii.com:1337/announce',
'udp://tracker.openbittorrent.com:80',
'udp://tracker.coppersurfer.tk:6969',
'udp://glotorrents.pw:6969/announce',
'udp://tracker.opentrackr.org:1337/announce',
'udp://torrent.gresille.org:80/announce',
'udp://p4p.arenabg.com:1337',
'udp://tracker.leechers-paradise.org:6969'
];
return {
id: movie.id?.toString(),
title: movie.title_english,
@@ -61,7 +50,7 @@ export class YTS {
quality: torrent.quality,
source: torrent.type,
year: movie.year?.toString(),
magnet: `magnet:?xt=urn:btih:${torrent.hash}&dn=${encodeURIComponent(query)}&tr=${trackers.join('&tr=')}`,
magnet: `magnet:?xt=urn:btih:${torrent.hash}&dn=${encodeURIComponent(query)}&tr=${TRACKERS.join('&tr=')}`,
hash: torrent.hash,
codec: torrent.video_codec
};