From 05416458db79e050f8500e1d543148ce4cf2ecdb Mon Sep 17 00:00:00 2001 From: ManiMatter <124743318+ManiMatter@users.noreply.github.com> Date: Thu, 2 May 2024 12:04:03 +0200 Subject: [PATCH] WebAPI: Provide "isPrivate" flag via "torrents/info" endpoint PR #20686. --- 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 b4333bc9973c..8883f4b823f6 100644 --- a/src/webui/api/serialize/serialize_torrent.cpp +++ b/src/webui/api/serialize/serialize_torrent.cpp @@ -163,6 +163,7 @@ QVariantMap serialize(const BitTorrent::Torrent &torrent) {KEY_TORRENT_AVAILABILITY, torrent.distributedCopies()}, {KEY_TORRENT_REANNOUNCE, torrent.nextAnnounce()}, {KEY_TORRENT_COMMENT, torrent.comment()}, + {KEY_TORRENT_ISPRIVATE, torrent.isPrivate()}, {KEY_TORRENT_TOTAL_SIZE, torrent.totalSize()} }; diff --git a/src/webui/api/serialize/serialize_torrent.h b/src/webui/api/serialize/serialize_torrent.h index db37f087e113..ee9d20ab71ba 100644 --- a/src/webui/api/serialize/serialize_torrent.h +++ b/src/webui/api/serialize/serialize_torrent.h @@ -93,5 +93,6 @@ inline const QString KEY_TORRENT_SEEDING_TIME = u"seeding_time"_s; inline const QString KEY_TORRENT_AVAILABILITY = u"availability"_s; inline const QString KEY_TORRENT_REANNOUNCE = u"reannounce"_s; inline const QString KEY_TORRENT_COMMENT = u"comment"_s; +inline const QString KEY_TORRENT_ISPRIVATE = u"is_private"_s; QVariantMap serialize(const BitTorrent::Torrent &torrent);