mirror of https://github.com/aria2/aria2
2008-11-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Print a message when no files to download. * src/download_helper.cc * src/main.cc * src/message.hpull/1/head
parent
1aef3cd005
commit
15586812c5
|
@ -1,3 +1,10 @@
|
||||||
|
2008-11-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
|
Print a message when no files to download.
|
||||||
|
* src/download_helper.cc
|
||||||
|
* src/main.cc
|
||||||
|
* src/message.h
|
||||||
|
|
||||||
2008-11-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
2008-11-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
RFC3986 complied Percent-Encoding(urlencode).
|
RFC3986 complied Percent-Encoding(urlencode).
|
||||||
|
|
|
@ -153,7 +153,7 @@ void createRequestGroupForMetalink
|
||||||
{
|
{
|
||||||
Metalink2RequestGroup(op).generate(result, op->get(PREF_METALINK_FILE), *op);
|
Metalink2RequestGroup(op).generate(result, op->get(PREF_METALINK_FILE), *op);
|
||||||
if(result.empty()) {
|
if(result.empty()) {
|
||||||
throw FatalException("No files to download.");
|
throw FatalException(MSG_NO_FILES_TO_DOWNLOAD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // ENABLE_METALINK
|
#endif // ENABLE_METALINK
|
||||||
|
|
|
@ -146,6 +146,7 @@ int main(int argc, char* argv[])
|
||||||
DefaultBtContextHandle btContext(new DefaultBtContext());
|
DefaultBtContextHandle btContext(new DefaultBtContext());
|
||||||
btContext->load(op->get(PREF_TORRENT_FILE));
|
btContext->load(op->get(PREF_TORRENT_FILE));
|
||||||
std::cout << btContext << std::endl;
|
std::cout << btContext << std::endl;
|
||||||
|
return EXIT_SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
createRequestGroupForBitTorrent(requestGroups, op, args);
|
createRequestGroupForBitTorrent(requestGroups, op, args);
|
||||||
}
|
}
|
||||||
|
@ -161,6 +162,7 @@ int main(int argc, char* argv[])
|
||||||
std::deque<SharedHandle<FileEntry> > fileEntries;
|
std::deque<SharedHandle<FileEntry> > fileEntries;
|
||||||
MetalinkEntry::toFileEntry(fileEntries, metalinkEntries);
|
MetalinkEntry::toFileEntry(fileEntries, metalinkEntries);
|
||||||
Util::toStream(std::cout, fileEntries);
|
Util::toStream(std::cout, fileEntries);
|
||||||
|
return EXIT_SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
createRequestGroupForMetalink(requestGroups, op);
|
createRequestGroupForMetalink(requestGroups, op);
|
||||||
}
|
}
|
||||||
|
@ -173,7 +175,9 @@ int main(int argc, char* argv[])
|
||||||
createRequestGroupForUri(requestGroups, op, args);
|
createRequestGroupForUri(requestGroups, op, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!requestGroups.empty()) {
|
if(requestGroups.empty()) {
|
||||||
|
std::cout << MSG_NO_FILES_TO_DOWNLOAD << std::endl;
|
||||||
|
} else {
|
||||||
returnValue = MultiUrlRequestInfo(requestGroups, op, getStatCalc(op),
|
returnValue = MultiUrlRequestInfo(requestGroups, op, getStatCalc(op),
|
||||||
getSummaryOut(op)).execute();
|
getSummaryOut(op)).execute();
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,6 +163,7 @@
|
||||||
_("Certificate verification failed. Cause: %s")
|
_("Certificate verification failed. Cause: %s")
|
||||||
#define MSG_NO_CERT_FOUND _("No certificate found.")
|
#define MSG_NO_CERT_FOUND _("No certificate found.")
|
||||||
#define MSG_HOSTNAME_NOT_MATCH _("Hostname not match.")
|
#define MSG_HOSTNAME_NOT_MATCH _("Hostname not match.")
|
||||||
|
#define MSG_NO_FILES_TO_DOWNLOAD _("No files to download.")
|
||||||
|
|
||||||
#define EX_TIME_OUT _("Timeout.")
|
#define EX_TIME_OUT _("Timeout.")
|
||||||
#define EX_INVALID_CHUNK_SIZE _("Invalid chunk size.")
|
#define EX_INVALID_CHUNK_SIZE _("Invalid chunk size.")
|
||||||
|
|
Loading…
Reference in New Issue