瀏覽代碼

2007-10-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

	* src/ConsoleCalc.cc (calculateStat): Hide SPD after the 
download
	finished.
Tatsuhiro Tsujikawa 18 年之前
父節點
當前提交
343228629a
共有 3 個文件被更改,包括 11 次插入4 次删除
  1. 5 0
      ChangeLog
  2. 1 1
      TODO
  3. 5 3
      src/ConsoleStatCalc.cc

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2007-10-16  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
+
+	* src/ConsoleCalc.cc (calculateStat): Hide SPD after the download
+	finished.
+
 2007-10-15  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
 	* src/Metalink2RequestGroup.cc (generate): Throw exception instead of

+ 1 - 1
TODO

@@ -52,4 +52,4 @@
 
 * Implement duplicate download checking in Bt
 * Implement the feature to treat http/ftp as auxuality download method for BitTorrent
-
+* Add PeerListenCommand to DownloadEngine only when it is really necessary.

+ 5 - 3
src/ConsoleStatCalc.cc

@@ -79,9 +79,11 @@ ConsoleStatCalc::calculateStat(const RequestGroupManHandle& requestGroupMan,
     cout << " "
 	 << "CN:"
 	 << firstRequestGroup->getNumConnection();
-    cout << " "
-	 << "SPD:"
-	 << fixed << setprecision(2) << stat.getDownloadSpeed()/1024.0 << "KiB/s";
+    if(!firstRequestGroup->downloadFinished()) {
+      cout << " "
+	   << "SPD:"
+	   << fixed << setprecision(2) << stat.getDownloadSpeed()/1024.0 << "KiB/s";
+    }
     if(stat.getSessionUploadLength() > 0) {
       cout << " "
 	   << "UP:"