mirror of
https://github.com/transmission/transmission.git
synced 2026-02-14 23:19:34 +00:00
feat: sequential download (#4795)
This commit is contained in:
@@ -68,7 +68,7 @@ static sig_atomic_t manualUpdate = false;
|
||||
|
||||
static char const* torrentPath = nullptr;
|
||||
|
||||
static auto constexpr Options = std::array<tr_option, 19>{
|
||||
static auto constexpr Options = std::array<tr_option, 20>{
|
||||
{ { 'b', "blocklist", "Enable peer blocklists", "b", false, nullptr },
|
||||
{ 'B', "no-blocklist", "Disable peer blocklists", "B", false, nullptr },
|
||||
{ 'd', "downlimit", "Set max download speed in " SPEED_K_STR, "d", true, "<speed>" },
|
||||
@@ -93,6 +93,8 @@ static auto constexpr Options = std::array<tr_option, 19>{
|
||||
{ 'v', "verify", "Verify the specified torrent", "v", false, nullptr },
|
||||
{ 'V', "version", "Show version number and exit", "V", false, nullptr },
|
||||
{ 'w', "download-dir", "Where to save downloaded data", "w", true, "<path>" },
|
||||
{ 500, "sequential-download", "Download pieces sequentially", "seq", false, nullptr },
|
||||
|
||||
{ 0, nullptr, nullptr, nullptr, false, nullptr } }
|
||||
};
|
||||
|
||||
@@ -445,6 +447,10 @@ static int parseCommandLine(tr_variant* d, int argc, char const** argv)
|
||||
tr_variantDictAddInt(d, TR_KEY_encryption, TR_CLEAR_PREFERRED);
|
||||
break;
|
||||
|
||||
case 500:
|
||||
tr_variantDictAddBool(d, TR_KEY_sequentialDownload, true);
|
||||
break;
|
||||
|
||||
case TR_OPT_UNK:
|
||||
if (torrentPath == nullptr)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user