mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
@@ -63,8 +63,12 @@ namespace Jackett.Server.Controllers
|
||||
&& downloadBytes[6] == 0x3a // :
|
||||
)
|
||||
{
|
||||
var magneturi = Encoding.UTF8.GetString(downloadBytes);
|
||||
return Redirect(new Uri(magneturi).ToString());
|
||||
// some sites provide magnet links with non-ascii characters, the only way to be sure the url
|
||||
// is well encoded is to unscape and escape again
|
||||
// https://github.com/Jackett/Jackett/issues/5372
|
||||
// https://github.com/Jackett/Jackett/issues/4761
|
||||
var magneturi = Uri.EscapeUriString(Uri.UnescapeDataString(Encoding.UTF8.GetString(downloadBytes)));
|
||||
return Redirect(magneturi);
|
||||
}
|
||||
|
||||
// This will fix torrents where the keys are not sorted, and thereby not supported by Sonarr.
|
||||
|
Reference in New Issue
Block a user