diff --git a/src/base/bittorrent/torrentimpl.cpp b/src/base/bittorrent/torrentimpl.cpp index 5a2b6aac9..de6d12c5d 100644 --- a/src/base/bittorrent/torrentimpl.cpp +++ b/src/base/bittorrent/torrentimpl.cpp @@ -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));