mirror of https://github.com/aria2/aria2
2009-07-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
--bt-stop-timeout now only checks download speed. * src/BtStopDownloadCommand.cc * src/BtStopDownloadCommand.h * src/BtSetup.cc * src/usage_text.h * doc/aria2c.1.txtpull/1/head
parent
4f96c37ade
commit
69c3dfded4
|
@ -1,3 +1,12 @@
|
|||
2009-07-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
--bt-stop-timeout now only checks download speed.
|
||||
* src/BtStopDownloadCommand.cc
|
||||
* src/BtStopDownloadCommand.h
|
||||
* src/BtSetup.cc
|
||||
* src/usage_text.h
|
||||
* doc/aria2c.1.txt
|
||||
|
||||
2009-07-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Fixed compile error regarding BUFSIZE.
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
.\" Title: aria2c
|
||||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.75.0 <http://docbook.sf.net/>
|
||||
.\" Date: 07/05/2009
|
||||
.\" Date: 07/06/2009
|
||||
.\" Manual: Aria2 Manual
|
||||
.\" Source: Aria2
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "ARIA2C" "1" "07/05/2009" "Aria2" "Aria2 Manual"
|
||||
.TH "ARIA2C" "1" "07/06/2009" "Aria2" "Aria2 Manual"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
|
@ -538,7 +538,7 @@ Seed previously downloaded files without verifying piece hashes\&. Default:
|
|||
.PP
|
||||
\fB\-\-bt\-stop\-timeout\fR=SEC
|
||||
.RS 4
|
||||
Stop BitTorrent download if download speed is 0 and the number of seeder is 0 in consecutive NUM seconds\&. If
|
||||
Stop BitTorrent download if download speed is 0 in consecutive NUM seconds\&. If
|
||||
\fI0\fR
|
||||
is given, this feature is disabled\&. Default:
|
||||
\fI0\fR
|
||||
|
|
|
@ -1103,9 +1103,8 @@ writes the piece to the appropriate files.</td>
|
|||
</dt>
|
||||
<dd>
|
||||
<p>
|
||||
Stop BitTorrent download if download speed is 0 and the number of
|
||||
seeder is 0 in consecutive NUM seconds. If <em>0</em> is given, this
|
||||
feature is disabled. Default: <em>0</em>
|
||||
Stop BitTorrent download if download speed is 0 in consecutive NUM
|
||||
seconds. If <em>0</em> is given, this feature is disabled. Default: <em>0</em>
|
||||
</p>
|
||||
</dd>
|
||||
<dt class="hdlist1">
|
||||
|
@ -3197,7 +3196,7 @@ files in the program, then also delete it here.</p></div>
|
|||
</div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated 2009-07-05 18:30:39 JST
|
||||
Last updated 2009-07-06 22:33:35 JST
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -379,9 +379,8 @@ BitTorrent Specific Options
|
|||
|
||||
*--bt-stop-timeout*=SEC::
|
||||
|
||||
Stop BitTorrent download if download speed is 0 and the number of
|
||||
seeder is 0 in consecutive NUM seconds. If '0' is given, this
|
||||
feature is disabled. Default: '0'
|
||||
Stop BitTorrent download if download speed is 0 in consecutive NUM
|
||||
seconds. If '0' is given, this feature is disabled. Default: '0'
|
||||
|
||||
*--bt-tracker-interval*=SEC::
|
||||
Set the interval in seconds between tracker requests. This
|
||||
|
|
|
@ -165,7 +165,6 @@ void BtSetup::setup(std::deque<Command*>& commands,
|
|||
new BtStopDownloadCommand(e->newCUID(), requestGroup, e, btStopTimeout);
|
||||
stopDownloadCommand->setBtRuntime(btRuntime);
|
||||
stopDownloadCommand->setPieceStorage(pieceStorage);
|
||||
stopDownloadCommand->setPeerStorage(peerStorage);
|
||||
commands.push_back(stopDownloadCommand);
|
||||
}
|
||||
btRuntime->setReady(true);
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
/* copyright --> */
|
||||
#include "BtStopDownloadCommand.h"
|
||||
#include "PieceStorage.h"
|
||||
#include "PeerStorage.h"
|
||||
#include "RequestGroup.h"
|
||||
#include "BtRuntime.h"
|
||||
#include "Peer.h"
|
||||
|
@ -68,13 +67,7 @@ void BtStopDownloadCommand::preProcess()
|
|||
|
||||
void BtStopDownloadCommand::process()
|
||||
{
|
||||
if(_requestGroup->calculateStat().getDownloadSpeed() == 0) {
|
||||
std::deque<SharedHandle<Peer> > activePeers;
|
||||
_peerStorage->getActivePeers(activePeers);
|
||||
if(countSeeder(activePeers.begin(), activePeers.end()) != 0) {
|
||||
_checkPoint.reset();
|
||||
}
|
||||
} else {
|
||||
if(_requestGroup->calculateStat().getDownloadSpeed() > 0) {
|
||||
_checkPoint.reset();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,6 @@ namespace aria2 {
|
|||
|
||||
class RequestGroup;
|
||||
class PieceStorage;
|
||||
class PeerStorage;
|
||||
class BtRuntime;
|
||||
|
||||
// Stop downloading torrent if in consecutive _timeout seconds,
|
||||
|
@ -57,8 +56,6 @@ private:
|
|||
|
||||
SharedHandle<BtRuntime> _btRuntime;
|
||||
|
||||
SharedHandle<PeerStorage> _peerStorage;
|
||||
|
||||
SharedHandle<PieceStorage> _pieceStorage;
|
||||
public:
|
||||
BtStopDownloadCommand
|
||||
|
@ -80,11 +77,6 @@ public:
|
|||
{
|
||||
_pieceStorage = pieceStorage;
|
||||
}
|
||||
|
||||
void setPeerStorage(const SharedHandle<PeerStorage>& peerStorage)
|
||||
{
|
||||
_peerStorage = peerStorage;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace aria2
|
||||
|
|
|
@ -559,6 +559,6 @@ _(" --on-download-stop=COMMAND Set the command to be executed when download\n"
|
|||
" See --on-download-start option for the\n"\
|
||||
" requirement of COMMAND.")
|
||||
#define TEXT_BT_STOP_TIMEOUT \
|
||||
_(" --bt-stop-timeout=SEC Stop BitTorrent download if download speed is 0\n"\
|
||||
" and the number of seeder is 0 in consecutive NUM\n"\
|
||||
" seconds. If 0 is given, this feature is disabled.")
|
||||
_(" --bt-stop-timeout=SEC Stop BitTorrent download if download speed is 0 in\n"\
|
||||
" consecutive NUM seconds. If 0 is given, this\n"\
|
||||
" feature is disabled.")
|
||||
|
|
Loading…
Reference in New Issue