diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-11-10 17:14:54 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-11-10 18:19:02 +0900 |
| commit | 9e52483c04045ced0aa11b408f905a2baa97ea49 (patch) | |
| tree | c4ff5a083b2bff01a3d335d378fba771fabf2d85 /src/Metalink2RequestGroup.cc | |
| parent | ba3b823a667fbb794d811b3c565aa103391a0e1c (diff) | |
Refactor DownloadHandlerFactory
Diffstat (limited to 'src/Metalink2RequestGroup.cc')
| -rw-r--r-- | src/Metalink2RequestGroup.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Metalink2RequestGroup.cc b/src/Metalink2RequestGroup.cc index 2a856bb9..87a36779 100644 --- a/src/Metalink2RequestGroup.cc +++ b/src/Metalink2RequestGroup.cc @@ -47,7 +47,6 @@ #include "metalink_helper.h" #include "BinaryStream.h" #include "MemoryBufferPreDownloadHandler.h" -#include "TrueRequestGroupCriteria.h" #include "MetalinkEntry.h" #include "MetalinkResource.h" #include "MetalinkMetaurl.h" @@ -59,6 +58,8 @@ #include "SegList.h" #include "DownloadFailureException.h" #include "Signature.h" +#include "download_handlers.h" +#include "RequestGroupCriteria.h" #ifdef ENABLE_BITTORRENT # include "BtDependency.h" # include "download_helper.h" @@ -233,9 +234,8 @@ Metalink2RequestGroup::createRequestGroup // tranparent metalink torrentRg->getDownloadContext()->setAcceptMetalink(false); // make it in-memory download - auto preh = std::make_shared<MemoryBufferPreDownloadHandler>(); - preh->setCriteria(std::make_shared<TrueRequestGroupCriteria>()); - torrentRg->addPreDownloadHandler(preh); + torrentRg->addPreDownloadHandler + (download_handlers::getMemoryPreDownloadHandler()); groups.push_back(torrentRg); } } |
