Split TorrentHandle interface and implementation

This commit is contained in:
Vladimir Golovnev (Glassez) 2020-04-12 18:08:19 +03:00
commit 1132b84548
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7
19 changed files with 2765 additions and 2538 deletions

View file

@ -30,6 +30,7 @@
#include <QDateTime>
#include "base/bittorrent/infohash.h"
#include "base/bittorrent/torrenthandle.h"
#include "base/utils/fs.h"
@ -85,7 +86,7 @@ QVariantMap serialize(const BitTorrent::TorrentHandle &torrent)
QVariantMap ret = {
{KEY_TORRENT_HASH, QString(torrent.hash())},
{KEY_TORRENT_NAME, torrent.name()},
{KEY_TORRENT_MAGNET_URI, torrent.toMagnetUri()},
{KEY_TORRENT_MAGNET_URI, torrent.createMagnetURI()},
{KEY_TORRENT_SIZE, torrent.wantedSize()},
{KEY_TORRENT_PROGRESS, torrent.progress()},
{KEY_TORRENT_DLSPEED, torrent.downloadPayloadRate()},