feat: ajout d'une variable d'environment pour augmenter la durée du token ou le desactiver avec "never" ou 0

feat: ajout du .env dans les dossiers du binaires pour pouvoir changer leur valeurs

fix: utilisation du fichier torrent avec le magnet pour les bug de metadonnées

fix: prise en charge de multiple torrent sur les telechargement d'episodes
This commit is contained in:
MasutaYunikon committed 2026-04-21 23:08:41 +02:00
1 parent 79b6a8bbb4
commit f897116e30
10 files changed
+249 -101

No files matched your search

+2 -1
View File
@@ -58,7 +58,8 @@ export interface TorrentInfo {
export interface DownloadOptions {
file_index?: number | null
file_path?: string | null
file_path ?: string | null
magnet ?: string | null // conservé pour extraire le hash même quand on envoie le .torrent
}
export interface TorrentClientDriver {
+2
View File
@@ -216,7 +216,9 @@ const QB: TorrentClientDriver = {
async add(config, url, options?: DownloadOptions) {
const sid = await qbLogin(config)
// Extraire le hash depuis l'URL (si magnet) ou depuis options.magnet (si .torrent URL)
const hashMatch = url.match(/xt=urn:btih:([a-fA-F0-9]{40,})/i)
?? options?.magnet?.match(/xt=urn:btih:([a-fA-F0-9]{40,})/i)
const hash = hashMatch?.[1]?.toLowerCase() ?? null
if (options?.file_index != null && hash) {
+1
View File
@@ -290,6 +290,7 @@ const RT: TorrentClientDriver = {
async add(config, url, options?: DownloadOptions) {
const hashMatch = url.match(/xt=urn:btih:([a-fA-F0-9]{40,})/i)
?? options?.magnet?.match(/xt=urn:btih:([a-fA-F0-9]{40,})/i)
const hash = hashMatch?.[1]?.toUpperCase() ?? null
if (options?.file_index != null && hash) {