From 48f42fdcbde268d4e544f8687cc8e4527a88b3a0 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 +- src/NzbDrone.Core/Lidarr.Core.csproj | 2 +- .../MediaFiles/TorrentInfo/TorrentFileInfoReader.cs | 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 cdee0e799..9b4d9f974 100644 --- a/src/NzbDrone.Core/Download/TorrentClientBase.cs +++ b/src/NzbDrone.Core/Download/TorrentClientBase.cs @@ -221,7 +221,7 @@ private string DownloadFromMagnetUrl(RemoteAlbum remoteAlbum, 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 712c23d39..a6eaad92f 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/Lidarr.Core.csproj b/src/NzbDrone.Core/Lidarr.Core.csproj index a598b379f..09e56193f 100644 --- a/src/NzbDrone.Core/Lidarr.Core.csproj +++ b/src/NzbDrone.Core/Lidarr.Core.csproj @@ -28,7 +28,7 @@ - + diff --git a/src/NzbDrone.Core/MediaFiles/TorrentInfo/TorrentFileInfoReader.cs b/src/NzbDrone.Core/MediaFiles/TorrentInfo/TorrentFileInfoReader.cs index b822a1383..8075bfbc8 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 {