mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 20:58:07 -06:00
Add ability to display torrent "privateness" in UI
PR #20951. --------- Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com> Co-authored-by: Vladimir Golovnev <glassez@yandex.ru> Co-authored-by: thalieht <thalieht@users.noreply.github.com>
This commit is contained in:
@@ -163,7 +163,8 @@ QVariantMap serialize(const BitTorrent::Torrent &torrent)
|
||||
{KEY_TORRENT_AVAILABILITY, torrent.distributedCopies()},
|
||||
{KEY_TORRENT_REANNOUNCE, torrent.nextAnnounce()},
|
||||
{KEY_TORRENT_COMMENT, torrent.comment()},
|
||||
{KEY_TORRENT_PRIVATE, torrent.isPrivate()},
|
||||
{KEY_TORRENT_TOTAL_SIZE, torrent.totalSize()}
|
||||
{KEY_TORRENT_PRIVATE, (torrent.hasMetadata() ? torrent.isPrivate() : QVariant())},
|
||||
{KEY_TORRENT_TOTAL_SIZE, torrent.totalSize()},
|
||||
{KEY_TORRENT_HAS_METADATA, torrent.hasMetadata()}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -94,5 +94,6 @@ 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_PRIVATE = u"private"_s;
|
||||
inline const QString KEY_TORRENT_HAS_METADATA = u"has_metadata"_s;
|
||||
|
||||
QVariantMap serialize(const BitTorrent::Torrent &torrent);
|
||||
|
||||
Reference in New Issue
Block a user