From a77d96e2cfd9d7d04087b342487ce77303384844 Mon Sep 17 00:00:00 2001
From: Tatsuhiro Tsujikawa
Date: Tue, 12 Jan 2010 14:30:47 +0000
Subject: [PATCH] 2010-01-12 Tatsuhiro Tsujikawa
Added --bt-metadata-only option. If true is given to this option,
aria2 downloads metadata only. The file(s) described in metadata
will not be downloaded. This option has effect only when
BitTorrent Magnet URI is used. See also --bt-save-metadata option.
* doc/aria2c.1.txt
* src/OptionHandlerFactory.cc
* src/UTMetadataPostDownloadHandler.cc
* src/download_helper.cc
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
---
ChangeLog | 14 ++++++++++++++
doc/aria2c.1 | 29 ++++++++++++++++++++++++----
doc/aria2c.1.html | 22 ++++++++++++++++++---
doc/aria2c.1.txt | 12 ++++++++++--
src/OptionHandlerFactory.cc | 9 +++++++++
src/UTMetadataPostDownloadHandler.cc | 12 +++++++-----
src/download_helper.cc | 1 +
src/prefs.cc | 2 ++
src/prefs.h | 2 ++
src/usage_text.h | 12 +++++++++---
10 files changed, 98 insertions(+), 17 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c0393031..f378f341 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2010-01-12 Tatsuhiro Tsujikawa
+
+ Added --bt-metadata-only option. If true is given to this option,
+ aria2 downloads metadata only. The file(s) described in metadata
+ will not be downloaded. This option has effect only when
+ BitTorrent Magnet URI is used. See also --bt-save-metadata option.
+ * doc/aria2c.1.txt
+ * src/OptionHandlerFactory.cc
+ * src/UTMetadataPostDownloadHandler.cc
+ * src/download_helper.cc
+ * src/prefs.cc
+ * src/prefs.h
+ * src/usage_text.h
+
2010-01-12 Tatsuhiro Tsujikawa
Fixed memory leak. Commands stored in std::deque are not
diff --git a/doc/aria2c.1 b/doc/aria2c.1
index 099760f4..1ec4cf5e 100644
--- a/doc/aria2c.1
+++ b/doc/aria2c.1
@@ -2,12 +2,12 @@
.\" Title: aria2c
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.75.2
-.\" Date: 01/10/2010
+.\" Date: 01/12/2010
.\" Manual: Aria2 Manual
.\" Source: Aria2
.\" Language: English
.\"
-.TH "ARIA2C" "1" "01/10/2010" "Aria2" "Aria2 Manual"
+.TH "ARIA2C" "1" "01/12/2010" "Aria2" "Aria2 Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -310,7 +310,7 @@ is set, then authorization header is always sent to the server\&. There is an ex
.RS 4
Send Cache\-Control: no\-cache and Pragma: no\-cache header to avoid cached content\&. If
\fIfalse\fR
-is given , these headers are not sent and you can add Cache\-Control header with a directive you like using
+is given, these headers are not sent and you can add Cache\-Control header with a directive you like using
\fB\-\-header\fR
option\&. Default:
\fItrue\fR
@@ -519,6 +519,14 @@ option\&. Default:
\fI55\fR
.RE
.PP
+\fB\-\-bt\-metadata\-only\fR[=\fItrue\fR|\fIfalse\fR]
+.RS 4
+Download metadata only\&. The file(s) described in metadata will not be downloaded\&. This option has effect only when BitTorrent Magnet URI is used\&. See also
+\fB\-\-bt\-save\-metadata\fR
+option\&. Default:
+\fIfalse\fR
+.RE
+.PP
\fB\-\-bt\-min\-crypto\-level\fR=\fIplain\fR|\fIarc4\fR
.RS 4
Set minimum level of encryption method\&. If several encryption methods are provided by a peer, aria2 chooses the lowest one which satisfies the given level\&. Default:
@@ -555,7 +563,9 @@ or
.PP
\fB\-\-bt\-save\-metadata\fR[=\fItrue\fR|\fIfalse\fR]
.RS 4
-Save metadata as \&.torrent file\&. This option has effect only when BitTorrent Magnet URI is used\&. The filename is hex encoded info hash with suffix \&.torrent\&. The directory to be saved is the same directory where download file is saved\&. If the same file already exists, metadata is not saved\&. Default:
+Save metadata as \&.torrent file\&. This option has effect only when BitTorrent Magnet URI is used\&. The filename is hex encoded info hash with suffix \&.torrent\&. The directory to be saved is the same directory where download file is saved\&. If the same file already exists, metadata is not saved\&. See also
+\fB\-\-bt\-metadata\-only\fR
+option\&. Default:
\fIfalse\fR
.RE
.PP
@@ -1739,6 +1749,17 @@ bt\-max\-peers
.sp -1
.IP \(bu 2.3
.\}
+bt\-metadata\-only
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
bt\-min\-crypto\-level
.RE
.sp
diff --git a/doc/aria2c.1.html b/doc/aria2c.1.html
index 6912d5ca..6c80f684 100644
--- a/doc/aria2c.1.html
+++ b/doc/aria2c.1.html
@@ -929,7 +929,7 @@ aria2c -o myfile.zip "http://mirror1/file.zip" "http://mirror2/file.zip"
Send Cache-Control: no-cache and Pragma: no-cache header to avoid
- cached content. If false is given , these headers are not sent
+ cached content. If false is given, these headers are not sent
and you can add Cache-Control header with a directive you like
using --header option. Default: true
@@ -1213,6 +1213,16 @@ writes the piece to the appropriate files.
+--bt-metadata-only[=true|false]
+
+
+
+ Download metadata only. The file(s) described in metadata will not
+ be downloaded. This option has effect only when BitTorrent Magnet
+ URI is used. See also --bt-save-metadata option. Default: false
+
+
+
--bt-min-crypto-level=plain|arc4
@@ -1271,7 +1281,8 @@ writes the piece to the appropriate files.
BitTorrent Magnet URI is used. The filename is hex encoded info
hash with suffix .torrent. The directory to be saved is the same
directory where download file is saved. If the same file already
- exists, metadata is not saved. Default: false
+ exists, metadata is not saved. See also --bt-metadata-only
+ option. Default: false
@@ -2399,6 +2410,11 @@ bt-max-peers
+bt-metadata-only
+
+
+
+
bt-min-crypto-level
@@ -3562,7 +3578,7 @@ files in the program, then also delete it here.