mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 23:47:23 -06:00
WebAPI: Provide "isPrivate" flag via "torrents/info" endpoint
PR #20686.
This commit is contained in:
@@ -163,6 +163,7 @@ QVariantMap serialize(const BitTorrent::Torrent &torrent)
|
|||||||
{KEY_TORRENT_AVAILABILITY, torrent.distributedCopies()},
|
{KEY_TORRENT_AVAILABILITY, torrent.distributedCopies()},
|
||||||
{KEY_TORRENT_REANNOUNCE, torrent.nextAnnounce()},
|
{KEY_TORRENT_REANNOUNCE, torrent.nextAnnounce()},
|
||||||
{KEY_TORRENT_COMMENT, torrent.comment()},
|
{KEY_TORRENT_COMMENT, torrent.comment()},
|
||||||
|
{KEY_TORRENT_ISPRIVATE, torrent.isPrivate()},
|
||||||
|
|
||||||
{KEY_TORRENT_TOTAL_SIZE, torrent.totalSize()}
|
{KEY_TORRENT_TOTAL_SIZE, torrent.totalSize()}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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_AVAILABILITY = u"availability"_s;
|
||||||
inline const QString KEY_TORRENT_REANNOUNCE = u"reannounce"_s;
|
inline const QString KEY_TORRENT_REANNOUNCE = u"reannounce"_s;
|
||||||
inline const QString KEY_TORRENT_COMMENT = u"comment"_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);
|
QVariantMap serialize(const BitTorrent::Torrent &torrent);
|
||||||
|
|||||||
Reference in New Issue
Block a user