mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-01-05 14:47:25 +03:00
Add eXact Length parameter when creating magnet URI
Include the `xl` (eXact Length) parameter in the magnet URI string inside the function `TorrentImpl::createMagnetURI()`. Closes #20752. PR #21958.
This commit is contained in:
parent
a311c259cc
commit
27451469fa
1 changed files with 5 additions and 0 deletions
|
@ -2863,6 +2863,11 @@ QString TorrentImpl::createMagnetURI() const
|
|||
ret += u"&dn=" + QString::fromLatin1(QUrl::toPercentEncoding(displayName));
|
||||
}
|
||||
|
||||
if (hasMetadata())
|
||||
{
|
||||
ret += u"&xl=" + QString::number(totalSize());
|
||||
}
|
||||
|
||||
for (const TrackerEntryStatus &tracker : asConst(trackers()))
|
||||
{
|
||||
ret += u"&tr=" + QString::fromLatin1(QUrl::toPercentEncoding(tracker.url));
|
||||
|
|
Loading…
Reference in a new issue