new share_action_limit json prop

This commit is contained in:
Mark Yu 2025-07-13 11:50:58 -04:00
commit 9337815cdf
4 changed files with 4 additions and 0 deletions

View file

@ -171,6 +171,7 @@ QVariantMap serialize(const BitTorrent::Torrent &torrent)
{KEY_TORRENT_POPULARITY, torrent.popularity()},
{KEY_TORRENT_SEEDING_TIME_LIMIT, torrent.seedingTimeLimit()},
{KEY_TORRENT_INACTIVE_SEEDING_TIME_LIMIT, torrent.inactiveSeedingTimeLimit()},
{KEY_TORRENT_SHARE_ACTION_LIMIT, static_cast<int>(torrent.shareLimitAction())},
{KEY_TORRENT_LAST_SEEN_COMPLETE_TIME, Utils::DateTime::toSecsSinceEpoch(torrent.lastSeenComplete())},
{KEY_TORRENT_AUTO_TORRENT_MANAGEMENT, torrent.isAutoTMMEnabled()},
{KEY_TORRENT_TIME_ACTIVE, torrent.activeTime()},

View file

@ -85,6 +85,7 @@ inline const QString KEY_TORRENT_MAX_INACTIVE_SEEDING_TIME = u"max_inactive_seed
inline const QString KEY_TORRENT_RATIO_LIMIT = u"ratio_limit"_s;
inline const QString KEY_TORRENT_SEEDING_TIME_LIMIT = u"seeding_time_limit"_s;
inline const QString KEY_TORRENT_INACTIVE_SEEDING_TIME_LIMIT = u"inactive_seeding_time_limit"_s;
inline const QString KEY_TORRENT_SHARE_ACTION_LIMIT = u"share_action_limit"_s;
inline const QString KEY_TORRENT_LAST_SEEN_COMPLETE_TIME = u"seen_complete"_s;
inline const QString KEY_TORRENT_LAST_ACTIVITY_TIME = u"last_activity"_s;
inline const QString KEY_TORRENT_TOTAL_SIZE = u"total_size"_s;

View file

@ -497,6 +497,7 @@ void SyncController::updateFreeDiskSpace(const qint64 freeDiskSpace)
// - "max_seeding_time": Upload max seeding time
// - "ratio_limit": Upload share ratio limit
// - "seeding_time_limit": Upload seeding time limit
// - "share_action_limit": Action to execute when the limit is reached
// - "seen_complete": Indicates the time when the torrent was last seen complete/whole
// - "last_activity": Last time when a chunk was downloaded/uploaded
// - "total_size": Size including unwanted data

View file

@ -449,6 +449,7 @@ window.qBittorrent.ContextMenu ??= (() => {
this.setEnabled("copyInfohash2", thereAreV2Hashes);
const contextTagList = document.getElementById("contextTagList");
for (const tag of tagMap.keys()) {
const checkbox = contextTagList.querySelector(`a[href="#Tag/${tag}"] input[type="checkbox"]`);
const count = tagCount.get(tag);