From 3f0fbc08102520d225f4e96c7070f7d71e5a057c Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Wed, 14 Mar 2018 00:37:48 -0400 Subject: [PATCH] WebUI rename property to match its definition --- src/webui/api/serialize/serialize_torrent.cpp | 2 +- src/webui/api/serialize/serialize_torrent.h | 2 +- src/webui/api/synccontroller.cpp | 2 +- src/webui/www/private/scripts/dynamicTable.js | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/webui/api/serialize/serialize_torrent.cpp b/src/webui/api/serialize/serialize_torrent.cpp index d28b20a55..82e2a18a4 100644 --- a/src/webui/api/serialize/serialize_torrent.cpp +++ b/src/webui/api/serialize/serialize_torrent.cpp @@ -120,7 +120,7 @@ QVariantMap serialize(const BitTorrent::TorrentHandle &torrent) ret[KEY_TORRENT_AMOUNT_UPLOADED_SESSION] = torrent.totalPayloadUpload(); ret[KEY_TORRENT_AMOUNT_LEFT] = torrent.incompletedSize(); ret[KEY_TORRENT_AMOUNT_COMPLETED] = torrent.completedSize(); - ret[KEY_TORRENT_RATIO_LIMIT] = torrent.maxRatio(); + ret[KEY_TORRENT_MAX_RATIO] = torrent.maxRatio(); ret[KEY_TORRENT_LAST_SEEN_COMPLETE_TIME] = torrent.lastSeenComplete().toTime_t(); ret[KEY_TORRENT_AUTO_TORRENT_MANAGEMENT] = torrent.isAutoTMMEnabled(); ret[KEY_TORRENT_TIME_ACTIVE] = torrent.activeTime(); diff --git a/src/webui/api/serialize/serialize_torrent.h b/src/webui/api/serialize/serialize_torrent.h index 8f861637a..cbc9a2af2 100644 --- a/src/webui/api/serialize/serialize_torrent.h +++ b/src/webui/api/serialize/serialize_torrent.h @@ -69,7 +69,7 @@ const char KEY_TORRENT_AMOUNT_DOWNLOADED_SESSION[] = "downloaded_session"; const char KEY_TORRENT_AMOUNT_UPLOADED_SESSION[] = "uploaded_session"; const char KEY_TORRENT_AMOUNT_LEFT[] = "amount_left"; const char KEY_TORRENT_AMOUNT_COMPLETED[] = "completed"; -const char KEY_TORRENT_RATIO_LIMIT[] = "ratio_limit"; +const char KEY_TORRENT_MAX_RATIO[] = "max_ratio"; const char KEY_TORRENT_LAST_SEEN_COMPLETE_TIME[] = "seen_complete"; const char KEY_TORRENT_LAST_ACTIVITY_TIME[] = "last_activity"; const char KEY_TORRENT_TOTAL_SIZE[] = "total_size"; diff --git a/src/webui/api/synccontroller.cpp b/src/webui/api/synccontroller.cpp index f88fbd51a..19533fdbb 100644 --- a/src/webui/api/synccontroller.cpp +++ b/src/webui/api/synccontroller.cpp @@ -351,7 +351,7 @@ namespace // - "amount_left": Amount of data left to download // - "save_path": Torrent save path // - "completed": Amount of data completed -// - "ratio_limit": Upload share ratio limit +// - "max_ratio": Upload max share ratio // - "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 diff --git a/src/webui/www/private/scripts/dynamicTable.js b/src/webui/www/private/scripts/dynamicTable.js index ebae00c21..00b6d1c5d 100644 --- a/src/webui/www/private/scripts/dynamicTable.js +++ b/src/webui/www/private/scripts/dynamicTable.js @@ -769,7 +769,7 @@ var TorrentsTable = new Class({ this.newColumn('time_active', '', 'QBT_TR(Time Active)QBT_TR[CONTEXT=TorrentModel]', 100, false); this.newColumn('save_path', '', 'QBT_TR(Save path)QBT_TR[CONTEXT=TorrentModel]', 100, false); this.newColumn('completed', '', 'QBT_TR(Completed)QBT_TR[CONTEXT=TorrentModel]', 100, false); - this.newColumn('ratio_limit', '', 'QBT_TR(Ratio Limit)QBT_TR[CONTEXT=TorrentModel]', 100, false); + this.newColumn('max_ratio', '', 'QBT_TR(Ratio Limit)QBT_TR[CONTEXT=TorrentModel]', 100, false); this.newColumn('seen_complete', '', 'QBT_TR(Last Seen Complete)QBT_TR[CONTEXT=TorrentModel]', 100, false); this.newColumn('last_activity', '', 'QBT_TR(Last Activity)QBT_TR[CONTEXT=TorrentModel]', 100, false); @@ -1076,8 +1076,8 @@ var TorrentsTable = new Class({ this.columns['save_path'].updateTd = this.columns['name'].updateTd; this.columns['tracker'].updateTd = this.columns['name'].updateTd; - // ratio_limit - this.columns['ratio_limit'].updateTd = this.columns['ratio'].updateTd; + // max_ratio + this.columns['max_ratio'].updateTd = this.columns['ratio'].updateTd; // last_activity this.columns['last_activity'].updateTd = function(td, row) {