From 81e1a050a274aacb7d40ac1d4c43b449b87e7782 Mon Sep 17 00:00:00 2001 From: buinsky Date: Thu, 4 Feb 2016 00:14:57 +0300 Subject: [PATCH] WebAPI: Add "Added on" and "Completion on" fields to query/torrents query response --- src/webui/btjson.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/webui/btjson.cpp b/src/webui/btjson.cpp index 0702f39d5..fd0380e08 100644 --- a/src/webui/btjson.cpp +++ b/src/webui/btjson.cpp @@ -106,6 +106,8 @@ static const char KEY_TORRENT_LABEL[] = "label"; static const char KEY_TORRENT_SUPER_SEEDING[] = "super_seeding"; static const char KEY_TORRENT_FORCE_START[] = "force_start"; static const char KEY_TORRENT_SAVE_PATH[] = "save_path"; +static const char KEY_TORRENT_ADDED_ON[] = "added_on"; +static const char KEY_TORRENT_COMPLETION_ON[] = "completion_on"; // Peer keys static const char KEY_PEER_IP[] = "ip"; @@ -707,6 +709,8 @@ QVariantMap toMap(BitTorrent::TorrentHandle *const torrent) ret[KEY_TORRENT_SUPER_SEEDING] = torrent->superSeeding(); ret[KEY_TORRENT_FORCE_START] = torrent->isForced(); ret[KEY_TORRENT_SAVE_PATH] = Utils::Fs::toNativePath(torrent->savePath()); + ret[KEY_TORRENT_ADDED_ON] = torrent->addedTime(); + ret[KEY_TORRENT_COMPLETION_ON] = torrent->completedTime(); return ret; }