Added bittorrent key to the response of tellStatus XML-RPC method.
The associated value of the key is a struct and contains data
retrieved from .torrent file, such as name, announce-list,
comment, etc.
* doc/aria2c.1.txt
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
* test/XmlRpcMethodTest.cc
Fixed the bug that cookie for domain a.b.c is not sent to the host
a.b.c if no other cookies are stored. Fixed the bug that
Cookie::markOriginServerOnly() is not called when cookies are
loaded from file/sqlite3 database.
* src/Cookie.h
* src/CookieStorage.cc
* src/NsCookieParser.cc
* src/Sqlite3MozCookieParser.cc
* test/CookieStorageTest.cc
* test/NsCookieParserTest.cc
* test/Sqlite3MozCookieParserTest.cc
* test/cookies.sqlite
* test/nscookietest.txt
Removed RequestGroup::initSegmentMan(). Guaranteed that either
both _pieceStorage and _segmentMan are initialized or they are
not.
* src/RequestGroup.cc
* src/RequestGroup.h
* test/BtDependencyTest.cc
Added dir and files key to the response struct of aria2.tellStatus
XML-RPC method. The value associated with files key is the list
of files. Its element is the same struct used in aria2.getFiles
XML-RPC method. Added uris key to the response struct of
aria2.getFiles XML-RPC method. The value associated with uris key
is the list of URIs. Its element is the same struct used in
aria2.getUris XML-RPC method.
* doc/aria2c.1.txt
* src/XmlRpcMethodImpl.cc
* test/XmlRpcMethodTest.cc
Added aria2.getSessionInfo XML-RPC method. This method returns a
struct containing Session ID, which is generated each time when
aria2 is invoked.
* doc/aria2c.1.txt
* doc/xmlrpc/aria2rpc
* src/DownloadEngine.cc
* src/DownloadEngine.h
* src/XmlRpcMethodFactory.cc
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
* test/XmlRpcMethodTest.cc
Now offset argument in aria2.tellWaiting and aria2.tellStopped
accepts a negative integer. 'offset' == -1 points last download
in the waiting queue and 'offset' == -2 points the download before
the last download, and so on. The downloads in the response are in
reversed order.
* doc/aria2c.1.txt
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
* test/XmlRpcMethodTest.cc
Now --all-proxy, --http-proxy, --https-proxy and --ftp-proxy
option accepts empty string "". When "" is given, it erases
previously defined proxy.
* doc/aria2c.1.txt
* src/OptionHandlerImpl.h
* src/usage_text.h
* test/OptionHandlerTest.cc
Fixed the bug that causes segmentation fault if unknown option is
put in aria2.conf file. BUG#2928303
* src/OptionParser.cc
* src/OptionParser.h
* src/option_processing.cc
* test/OptionParserTest.cc
Defined method name in XmlRpcMethod subclasses.
* src/XmlRpcMethodFactory.cc
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
* test/XmlRpcMethodTest.cc
Use AI_ADDRCONFIG flag if it is available. Refactored so that
getaddrinfo calls are not scattered around. Unset AI_ADDRCONFIG
when conducting unit tests because they fail if networking
interface is not configured with IPv4 address.
* src/NameResolver.cc
* src/SocketCore.cc
* src/SocketCore.h
* src/a2netcompat.h
* test/AllTest.cc
Added --bt-save-metadata option. When true is given, it saves
metadata as .torrent file. This option has effect only when
BitTorrent Magnet URI is used. The filename is name in metadata
with suffix .torrent. The directory to be saved is the same
directory where download file is saved. If the same file already
exists, metdata is not saved.
* src/OptionHandlerFactory.cc
* src/UTMetadataPostDownloadHandler.cc
* src/UTMetadataPostDownloadHandler.h
* src/message.h
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* test/UTMetadataDataExtensionMessageTest.cc
Added changePosition XML-RPC method. It takes 3 parameters: gid,
pos and how. This method changes the position of download denoted
by gid. If how is POS_SET, it moves the download to a position
relative to the beginning of the queue. If how is POS_CUR, it
moves the download to a position relative to the current
position. If how is POS_END, it moves the download to a position
relative to the end of the queue. If the destination position is
less than 0 or beyond the end of the queue, it moves the download
to the beginning or the end of the queue respectively. Returns
the destination position.
* src/RequestGroupMan.cc
* src/RequestGroupMan.h
* src/XmlRpcMethodFactory.cc
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
* test/RequestGroupManTest.cc
* test/XmlRpcMethodTest.cc
Sort _optionHandlers in OptionParser by name in ascending order.
Use vector instead of deque for efficiency.
* src/OptionHandler.h
* src/OptionHandlerFactory.h
* src/OptionParser.cc
* src/OptionParser.h
* src/version_usage.cc
* test/OptionParserTest.cc
Added following 2 keys, followedBy and belongsTo, to the response
of tellStatus.
followedBy: List of GIDs which are generated by the consequence of
this download. For example, when aria2 downloaded Metalink file,
it generates downloads described in it(see *--follow-metalink*
option). This value is useful to track these auto generated
downloads. If there is no such downloads, this key will not be
included in the response.
belongsTo: GID of a parent download. Some downloads are a part of
another download. For example, if a file in Metalink has
BitTorrent resource, the download of .torrent is a part of that
file. If this download has no parent, this key will not be
included in the response.
* src/BtPostDownloadHandler.cc
* src/DownloadResult.h
* src/Metalink2RequestGroup.cc
* src/MetalinkPostDownloadHandler.cc
* src/RequestGroup.cc
* src/RequestGroup.h
* src/UTMetadataPostDownloadHandler.cc
* src/XmlRpcMethodImpl.cc
* src/XmlRpcMethodImpl.h
Use last 8 bytes of peer ID as 'key' parameter for tracker request.
* src/DefaultBtAnnounce.cc
* src/DefaultBtAnnounce.h
* test/DefaultBtAnnounceTest.cc
Added option --bt-prioritize-piece. This option instruct aria2 to
try to download first and last pieces of each file first. The
argument can contain 2 keywords:head and tail. To include both
keywords, they must be separated by comma. These keywords can take
one parameter, SIZE. For example , if head=SIZE is specified,
pieces in the range of first SIZE bytes of each file get higher
priority. tail=SIZE means the range of last SIZE bytes of each
file. SIZE can include K or M(1K = 1024, 1M = 1024K).
* src/DefaultPieceStorage.h
* src/Makefile.am
* src/OptionHandlerFactory.cc
* src/OptionHandlerImpl.h
* src/PriorityPieceSelector.cc
* src/PriorityPieceSelector.h
* src/RequestGroup.cc
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* src/util.cc
* src/util.h
* test/Makefile.am
* test/MockPieceSelector.h
* test/PriorityPieceSelectorTest.cc
* test/UtilTest.cc
Accept BitTorrent Magnet URI in Metalink resource type bittorrent.
Rewritten UTMetadataPostDownloadHandler. To create torrent data
from metadata, use new metadata2Torrent() function.
* src/BtDependency.cc
* src/UTMetadataPostDownloadHandler.cc
* src/bittorrent_helper.cc
* src/bittorrent_helper.h
* test/BittorrentHelperTest.cc
* test/BtDependencyTest.cc
Fixed the bug which causes segmentation fault with tellWaiting
XML-RPC method when BitTorrent download is waiting. The key of
BtRegistry is changed from info hash to GID, because it is
registered per RequestGroup, not info hash.
* src/BtRegistry.cc
* src/BtRegistry.h
* src/BtSetup.cc
* src/ConsoleStatCalc.cc
* src/InitiatorMSEHandshakeCommand.cc
* src/PeerInitiateConnectionCommand.cc
* src/PeerInteractionCommand.cc
* src/PeerInteractionCommand.h
* src/PeerReceiveHandshakeCommand.cc
* src/RequestGroup.cc
* src/XmlRpcMethodImpl.cc
* test/BtRegistryTest.cc
* test/XmlRpcMethodTest.cc
Fixed the bug that trackers in BitTorrent Magnet URI are not
inherited to generated RequestGroup.
* src/UTMetadataPostDownloadHandler.cc
* test/UTMetadataPostDownloadHandlerTest.cc