mirror of
https://github.com/Viren070/AIOStreams.git
synced 2025-12-01 23:14:04 +01:00
fix: normalise redirect url when extracting infohash
This commit is contained in:
@@ -138,7 +138,9 @@ export class TorrentClient {
|
||||
const redirectUrl = response.headers.get('Location');
|
||||
if (!redirectUrl) throw new Error('Redirect location not found');
|
||||
|
||||
const hash = validateInfoHash(extractInfoHashFromMagnet(redirectUrl));
|
||||
const hash = validateInfoHash(
|
||||
extractInfoHashFromMagnet(redirectUrl.toLowerCase())
|
||||
);
|
||||
if (!hash) {
|
||||
if (redirectCount >= 3) {
|
||||
throw new Error(`Too many redirects: ${redirectUrl}`);
|
||||
|
||||
Reference in New Issue
Block a user