From e63691935dd92c23624b291a450de051e224d6c3 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 23 Jun 2025 16:18:31 -0700 Subject: [PATCH] Upgrade MonoTorrent to 3.0.2 (cherry picked from commit b0224c1c5cf00c8959c67d9e61f3e932800060c4) --- src/NzbDrone.Core/Download/TorrentClientBase.cs | 2 +- src/NzbDrone.Core/Indexers/TorrentRssParser.cs | 2 +- .../MediaFiles/TorrentInfo/TorrentFileInfoReader.cs | 2 +- src/NzbDrone.Core/Radarr.Core.csproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NzbDrone.Core/Download/TorrentClientBase.cs b/src/NzbDrone.Core/Download/TorrentClientBase.cs index 0b0b37d81b..b59d1ba326 100644 --- a/src/NzbDrone.Core/Download/TorrentClientBase.cs +++ b/src/NzbDrone.Core/Download/TorrentClientBase.cs @@ -221,7 +221,7 @@ private string DownloadFromMagnetUrl(RemoteMovie remoteMovie, IIndexer indexer, try { - hash = MagnetLink.Parse(magnetUrl).InfoHash.ToHex(); + hash = MagnetLink.Parse(magnetUrl).InfoHashes.V1OrV2.ToHex(); } catch (FormatException ex) { diff --git a/src/NzbDrone.Core/Indexers/TorrentRssParser.cs b/src/NzbDrone.Core/Indexers/TorrentRssParser.cs index 41350aaed3..e473b3407f 100644 --- a/src/NzbDrone.Core/Indexers/TorrentRssParser.cs +++ b/src/NzbDrone.Core/Indexers/TorrentRssParser.cs @@ -82,7 +82,7 @@ protected virtual string GetInfoHash(XElement item) { try { - return MagnetLink.Parse(magnetUrl).InfoHash.ToHex(); + return MagnetLink.Parse(magnetUrl).InfoHashes.V1OrV2.ToHex(); } catch { diff --git a/src/NzbDrone.Core/MediaFiles/TorrentInfo/TorrentFileInfoReader.cs b/src/NzbDrone.Core/MediaFiles/TorrentInfo/TorrentFileInfoReader.cs index b822a1383f..8075bfbc84 100644 --- a/src/NzbDrone.Core/MediaFiles/TorrentInfo/TorrentFileInfoReader.cs +++ b/src/NzbDrone.Core/MediaFiles/TorrentInfo/TorrentFileInfoReader.cs @@ -22,7 +22,7 @@ public string GetHashFromTorrentFile(byte[] fileContents) { try { - return Torrent.Load(fileContents).InfoHash.ToHex(); + return Torrent.Load(fileContents).InfoHashes.V1OrV2.ToHex(); } catch { diff --git a/src/NzbDrone.Core/Radarr.Core.csproj b/src/NzbDrone.Core/Radarr.Core.csproj index 7dd03ae5e5..63e829def7 100644 --- a/src/NzbDrone.Core/Radarr.Core.csproj +++ b/src/NzbDrone.Core/Radarr.Core.csproj @@ -24,7 +24,7 @@ - +