From 09ed0d6b6681adba7632b418b814e6440f31dcc1 Mon Sep 17 00:00:00 2001 From: David Newhall Date: Sun, 14 Jul 2024 22:44:26 -0700 Subject: [PATCH] WebAPI: Add root_path to torrent/info result PR #21066. Closes #21057. --- src/webui/api/serialize/serialize_torrent.cpp | 1 + src/webui/api/serialize/serialize_torrent.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/webui/api/serialize/serialize_torrent.cpp b/src/webui/api/serialize/serialize_torrent.cpp index d6076fda99e..d48a3a5c8db 100644 --- a/src/webui/api/serialize/serialize_torrent.cpp +++ b/src/webui/api/serialize/serialize_torrent.cpp @@ -135,6 +135,7 @@ QVariantMap serialize(const BitTorrent::Torrent &torrent) {KEY_TORRENT_SAVE_PATH, torrent.savePath().toString()}, {KEY_TORRENT_DOWNLOAD_PATH, torrent.downloadPath().toString()}, {KEY_TORRENT_CONTENT_PATH, torrent.contentPath().toString()}, + {KEY_TORRENT_ROOT_PATH, torrent.rootPath().toString()}, {KEY_TORRENT_ADDED_ON, Utils::DateTime::toSecsSinceEpoch(torrent.addedTime())}, {KEY_TORRENT_COMPLETION_ON, Utils::DateTime::toSecsSinceEpoch(torrent.completedTime())}, {KEY_TORRENT_TRACKER, torrent.currentTracker()}, diff --git a/src/webui/api/serialize/serialize_torrent.h b/src/webui/api/serialize/serialize_torrent.h index c9812ac07ee..883efa6dd5c 100644 --- a/src/webui/api/serialize/serialize_torrent.h +++ b/src/webui/api/serialize/serialize_torrent.h @@ -66,6 +66,7 @@ inline const QString KEY_TORRENT_FORCE_START = u"force_start"_s; inline const QString KEY_TORRENT_SAVE_PATH = u"save_path"_s; inline const QString KEY_TORRENT_DOWNLOAD_PATH = u"download_path"_s; inline const QString KEY_TORRENT_CONTENT_PATH = u"content_path"_s; +inline const QString KEY_TORRENT_ROOT_PATH = u"root_path"_s; inline const QString KEY_TORRENT_ADDED_ON = u"added_on"_s; inline const QString KEY_TORRENT_COMPLETION_ON = u"completion_on"_s; inline const QString KEY_TORRENT_TRACKER = u"tracker"_s;