Skip to content

Commit c9ffe3c

Browse files
davidnewhallglassez
authored andcommitted
WebAPI: Add root_path to torrent/info result
PR qbittorrent#21066. Closes qbittorrent#21057.
1 parent 558799f commit c9ffe3c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/webui/api/serialize/serialize_torrent.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ QVariantMap serialize(const BitTorrent::Torrent &torrent)
135135
{KEY_TORRENT_SAVE_PATH, torrent.savePath().toString()},
136136
{KEY_TORRENT_DOWNLOAD_PATH, torrent.downloadPath().toString()},
137137
{KEY_TORRENT_CONTENT_PATH, torrent.contentPath().toString()},
138+
{KEY_TORRENT_ROOT_PATH, torrent.rootPath().toString()},
138139
{KEY_TORRENT_ADDED_ON, Utils::DateTime::toSecsSinceEpoch(torrent.addedTime())},
139140
{KEY_TORRENT_COMPLETION_ON, Utils::DateTime::toSecsSinceEpoch(torrent.completedTime())},
140141
{KEY_TORRENT_TRACKER, torrent.currentTracker()},

src/webui/api/serialize/serialize_torrent.h

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ inline const QString KEY_TORRENT_FORCE_START = u"force_start"_s;
6666
inline const QString KEY_TORRENT_SAVE_PATH = u"save_path"_s;
6767
inline const QString KEY_TORRENT_DOWNLOAD_PATH = u"download_path"_s;
6868
inline const QString KEY_TORRENT_CONTENT_PATH = u"content_path"_s;
69+
inline const QString KEY_TORRENT_ROOT_PATH = u"root_path"_s;
6970
inline const QString KEY_TORRENT_ADDED_ON = u"added_on"_s;
7071
inline const QString KEY_TORRENT_COMPLETION_ON = u"completion_on"_s;
7172
inline const QString KEY_TORRENT_TRACKER = u"tracker"_s;

0 commit comments

Comments
 (0)