summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-07-18 17:34:34 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-07-18 17:34:34 +0900
commit99e5d85de01e6e12602e640b1f1ddb197da8411e (patch)
treed02b59d563446be12e679074a3f58c505eefbba0
parent8096690418f0343de22aaaf4315a044966631cc8 (diff)
parent7410b279902766bc632cc4c03c5091d37702dfb4 (diff)
Merge branch 'seed' of https://github.com/SSSSeb/aria2 into SSSSeb-seed
-rw-r--r--src/BtSetup.cc2
-rw-r--r--src/OptionHandlerFactory.cc2
-rw-r--r--src/prefs.h2
-rw-r--r--src/usage_text.h2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/BtSetup.cc b/src/BtSetup.cc
index e541fd7e..d74fe41c 100644
--- a/src/BtSetup.cc
+++ b/src/BtSetup.cc
@@ -158,7 +158,7 @@ void BtSetup::setup(std::vector<std::unique_ptr<Command>>& commands,
auto unionCri = make_unique<UnionSeedCriteria>();
if (option->defined(PREF_SEED_TIME)) {
unionCri->addSeedCriteria(make_unique<TimeSeedCriteria>(
- std::chrono::seconds(option->getAsInt(PREF_SEED_TIME) * 60)));
+ std::chrono::seconds((int)(option->getAsDouble(PREF_SEED_TIME) * 60))));
}
{
double ratio = option->getAsDouble(PREF_SEED_RATIO);
diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc
index 595f9cd9..9d5a9489 100644
--- a/src/OptionHandlerFactory.cc
+++ b/src/OptionHandlerFactory.cc
@@ -1799,7 +1799,7 @@ std::vector<OptionHandler*> OptionHandlerFactory::createOptionHandlers()
handlers.push_back(op);
}
{
- OptionHandler* op(new NumberOptionHandler(PREF_SEED_TIME, TEXT_SEED_TIME,
+ OptionHandler* op(new FloatNumberOptionHandler(PREF_SEED_TIME, TEXT_SEED_TIME,
NO_DEFAULT_VALUE, 0));
op->addTag(TAG_BITTORRENT);
op->setInitialOption(true);
diff --git a/src/prefs.h b/src/prefs.h
index 68eb408f..9188f656 100644
--- a/src/prefs.h
+++ b/src/prefs.h
@@ -420,7 +420,7 @@ extern PrefPtr PREF_LISTEN_PORT;
extern PrefPtr PREF_FOLLOW_TORRENT;
// values: 1*digit *( (,|-) 1*digit)
extern PrefPtr PREF_SELECT_FILE;
-// values: 1*digit
+// values: 1*digit ['.' [ 1*digit ] ]
extern PrefPtr PREF_SEED_TIME;
// values: 1*digit ['.' [ 1*digit ] ]
extern PrefPtr PREF_SEED_RATIO;
diff --git a/src/usage_text.h b/src/usage_text.h
index 6c30f84a..7ab6a7ff 100644
--- a/src/usage_text.h
+++ b/src/usage_text.h
@@ -313,7 +313,7 @@
" To limit the overall upload speed, use\n" \
" --max-overall-upload-limit option.")
#define TEXT_SEED_TIME \
- _(" --seed-time=MINUTES Specify seeding time in minutes. Also see the\n" \
+ _(" --seed-time=MINUTES Specify seeding time in (fractional) minutes. Also see the\n" \
" --seed-ratio option.")
#define TEXT_SEED_RATIO \
_(" --seed-ratio=RATIO Specify share ratio. Seed completed torrents\n" \