From b9e045e80b7eef0f5bedcada2f6505c0bdc6ebe9 Mon Sep 17 00:00:00 2001 From: sotiris-bos <39224671+sotiris-bos@users.noreply.github.com> Date: Sun, 25 Dec 2022 15:41:00 +0200 Subject: [PATCH] WebAPI: Expose "IS PRIVATE" flag PR #18227. Closes #16052. --- src/webui/api/torrentscontroller.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/webui/api/torrentscontroller.cpp b/src/webui/api/torrentscontroller.cpp index e998cbc7a..3d055a464 100644 --- a/src/webui/api/torrentscontroller.cpp +++ b/src/webui/api/torrentscontroller.cpp @@ -104,6 +104,7 @@ const QString KEY_PROP_CREATION_DATE = u"creation_date"_qs; const QString KEY_PROP_SAVE_PATH = u"save_path"_qs; const QString KEY_PROP_DOWNLOAD_PATH = u"download_path"_qs; const QString KEY_PROP_COMMENT = u"comment"_qs; +const QString KEY_PROP_ISPRIVATE = u"is_private"_qs; // File keys const QString KEY_FILE_INDEX = u"index"_qs; @@ -430,6 +431,7 @@ void TorrentsController::propertiesAction() dataDict[KEY_PROP_PIECE_SIZE] = torrent->pieceLength(); dataDict[KEY_PROP_PIECES_HAVE] = torrent->piecesHave(); dataDict[KEY_PROP_CREATED_BY] = torrent->creator(); + dataDict[KEY_PROP_ISPRIVATE] = torrent->isPrivate(); dataDict[KEY_PROP_ADDITION_DATE] = static_cast(torrent->addedTime().toSecsSinceEpoch()); if (torrent->hasMetadata()) {