Browse Source

Merge pull request #15294 from sledgehammer999/accept_v2_infohash

Accept v2 infohashes for download
adaptive-webui-19844
sledgehammer999 3 years ago committed by GitHub
parent
commit
3e92e716b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/base/bittorrent/magneturi.cpp

2
src/base/bittorrent/magneturi.cpp

@ -80,7 +80,7 @@ MagnetUri::MagnetUri(const QString &source) @@ -80,7 +80,7 @@ MagnetUri::MagnetUri(const QString &source)
if (source.isEmpty()) return;
if (isV2Hash(source))
m_url = QString::fromLatin1("magnet:?xt=urn:btmh:") + source;
m_url = QString::fromLatin1("magnet:?xt=urn:btmh:1220") + source; // 0x12 0x20 is the "multihash format" tag for the SHA-256 hashing scheme.
else if (isV1Hash(source))
m_url = QString::fromLatin1("magnet:?xt=urn:btih:") + source;

Loading…
Cancel
Save