mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 15:07:22 -06:00
Add compile definition to indicate using of libtorrent 2.0 (#15297)
The compile definition is temporary which will be removed when qbt ditches libtorrent 1.x.
This commit is contained in:
@@ -50,7 +50,7 @@ namespace
|
||||
|| str.startsWith("ftp://", Qt::CaseInsensitive)
|
||||
|| str.startsWith("magnet:", Qt::CaseInsensitive)
|
||||
|| ((str.size() == 40) && !str.contains(QRegularExpression("[^0-9A-Fa-f]"))) // v1 hex-encoded SHA-1 info-hash
|
||||
#if (LIBTORRENT_VERSION_NUM >= 20000)
|
||||
#ifdef QBT_USES_LIBTORRENT2
|
||||
|| ((str.size() == 64) && !str.contains(QRegularExpression("[^0-9A-Fa-f]"))) // v2 hex-encoded SHA-256 info-hash
|
||||
#endif
|
||||
|| ((str.size() == 32) && !str.contains(QRegularExpression("[^2-7A-Za-z]")))); // v1 Base32 encoded SHA-1 info-hash
|
||||
|
||||
Reference in New Issue
Block a user