From fb81d1c8c977f32b04da142ca97eec6ed1a1f2c3 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 21 Dec 2010 17:56:25 +0000 Subject: [PATCH] Display piece size in Web UI too --- src/webui/eventmanager.cpp | 2 ++ src/webui/html/prop-general.html | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/webui/eventmanager.cpp b/src/webui/eventmanager.cpp index ea4703467..3e8562aab 100644 --- a/src/webui/eventmanager.cpp +++ b/src/webui/eventmanager.cpp @@ -333,6 +333,8 @@ QVariantMap EventManager::getPropGeneralInfo(QString hash) const { data["save_path"] = p; // Creation date data["creation_date"] = h.creation_date(); + // Piece size + data["piece_size"] = misc::friendlyUnit(h.piece_length()); // Comment data["comment"] = h.comment(); data["total_wasted"] = QVariant(misc::friendlyUnit(h.total_failed_bytes()+h.total_redundant_bytes())); diff --git a/src/webui/html/prop-general.html b/src/webui/html/prop-general.html index 00ff386ff..553a7d5f9 100644 --- a/src/webui/html/prop-general.html +++ b/src/webui/html/prop-general.html @@ -12,6 +12,7 @@ +
_(Save path:)xxx
_(Created on:)xxx
_(Pieces size:)xxx
_(Torrent hash:)xxx

@@ -39,6 +40,7 @@ dynamic information: total_downloaded, total_uploaded, total_wasted, up_limit, d $('torrent_hash').set('html', ''); $('save_path').set('html', ''); $('creation_date').set('html', ''); + $('piece_size').set('html', ''); $('comment').set('html', ''); $('total_uploaded').set('html', ''); $('total_downloaded').set('html', ''); @@ -81,6 +83,7 @@ dynamic information: total_downloaded, total_uploaded, total_wasted, up_limit, d // Update Torrent data $('save_path').set('html', data.save_path); $('creation_date').set('html', data.creation_date); + $('piece_size').set('html', data.piece_size); $('comment').set('html', data.comment); $('total_uploaded').set('html', data.total_uploaded); $('total_downloaded').set('html', data.total_downloaded); @@ -102,4 +105,4 @@ dynamic information: total_downloaded, total_uploaded, total_wasted, up_limit, d } // Initial loading loadData(); - \ No newline at end of file +