Skip to content

Commit

Permalink
Add eXact Length parameter to magnet uri, solves #20752
Browse files Browse the repository at this point in the history
  • Loading branch information
antanilol committed Dec 5, 2024
1 parent 2d1c4fc commit da3422e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/base/bittorrent/torrentimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit da3422e

Please sign in to comment.