Include trackers in /sync/maindata API endpoint

This commit is contained in:
Thomas Piccirello 2020-05-02 04:23:23 -07:00
commit 84a40c1665
3 changed files with 33 additions and 0 deletions

View file

@ -32,6 +32,7 @@
#include "base/bittorrent/infohash.h"
#include "base/bittorrent/torrenthandle.h"
#include "base/bittorrent/trackerentry.h"
#include "base/utils/fs.h"
namespace
@ -110,6 +111,7 @@ QVariantMap serialize(const BitTorrent::TorrentHandle &torrent)
{KEY_TORRENT_ADDED_ON, torrent.addedTime().toSecsSinceEpoch()},
{KEY_TORRENT_COMPLETION_ON, torrent.completedTime().toSecsSinceEpoch()},
{KEY_TORRENT_TRACKER, torrent.currentTracker()},
{KEY_TORRENT_TRACKERS_COUNT, torrent.trackers().size()},
{KEY_TORRENT_DL_LIMIT, torrent.downloadLimit()},
{KEY_TORRENT_UP_LIMIT, torrent.uploadLimit()},
{KEY_TORRENT_AMOUNT_DOWNLOADED, torrent.totalDownload()},