WebAPI: Provide "isPrivate" flag via "torrents/info" endpoint

PR #20686.
This commit is contained in:
ManiMatter 2024-05-02 12:04:03 +02:00 committed by GitHub
parent cd3982cf3c
commit 05416458db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View file

@ -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()}
};

View file

@ -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);