fix: cors, alldebrid

This commit is contained in:
MasutaYunikon committed 2026-05-23 03:37:30 +02:00
1 parent e6b0bea455
commit 911ca86a0d
5 files changed
+31 -1

No files matched your search

+3
View File
@@ -97,6 +97,9 @@ const adDriver: TorrentClientDriver = {
},
async add(config, url, options?: DownloadOptions) {
if (options?.file_index != null)
logger.warn('alldebrid', `Sélection de fichier (index ${options.file_index}) non supportée par AllDebrid — pack complet téléchargé`)
const isMagnet = url.startsWith('magnet:')
const hash = (options?.infohash?.toLowerCase() ?? null)
|| url.match(/xt=urn:btih:([a-fA-F0-9]{40,})/i)?.[1]?.toLowerCase()