mirror of
https://github.com/fiso64/slsk-batchdl.git
synced 2024-12-22 14:32:40 +00:00
commit
This commit is contained in:
parent
4a3e8ddadb
commit
87fdff13cd
1 changed files with 9 additions and 1 deletions
|
@ -365,14 +365,20 @@ static class Program
|
||||||
|
|
||||||
bool confPathChanged = false;
|
bool confPathChanged = false;
|
||||||
int idx = Array.LastIndexOf(args, "--config");
|
int idx = Array.LastIndexOf(args, "--config");
|
||||||
|
int idx2 = Array.LastIndexOf(args, "--conf");
|
||||||
|
idx = idx > -1 ? idx : idx2;
|
||||||
if (idx != -1)
|
if (idx != -1)
|
||||||
{
|
{
|
||||||
confPath = args[idx + 1];
|
confPath = args[idx + 1];
|
||||||
confPathChanged = true;
|
confPathChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (System.IO.File.Exists(confPath) || confPathChanged)
|
if ((File.Exists(confPath) || confPathChanged) && confPath != "none")
|
||||||
{
|
{
|
||||||
|
if (confPathChanged && !File.Exists(confPath))
|
||||||
|
{
|
||||||
|
confPath = Path.Join(AppDomain.CurrentDomain.BaseDirectory, confPath);
|
||||||
|
}
|
||||||
string confArgs = System.IO.File.ReadAllText(confPath);
|
string confArgs = System.IO.File.ReadAllText(confPath);
|
||||||
List<string> finalArgs = new List<string>();
|
List<string> finalArgs = new List<string>();
|
||||||
finalArgs.AddRange(ParseCommand(confArgs));
|
finalArgs.AddRange(ParseCommand(confArgs));
|
||||||
|
@ -418,6 +424,7 @@ static class Program
|
||||||
case "--path":
|
case "--path":
|
||||||
parentFolder = args[++i];
|
parentFolder = args[++i];
|
||||||
break;
|
break;
|
||||||
|
case "--conf":
|
||||||
case "--config":
|
case "--config":
|
||||||
confPath = args[++i];
|
confPath = args[++i];
|
||||||
break;
|
break;
|
||||||
|
@ -580,6 +587,7 @@ static class Program
|
||||||
downloadMaxStaleTime = int.Parse(args[++i]);
|
downloadMaxStaleTime = int.Parse(args[++i]);
|
||||||
break;
|
break;
|
||||||
case "--cp":
|
case "--cp":
|
||||||
|
case "--cd":
|
||||||
case "--processes":
|
case "--processes":
|
||||||
case "--concurrent-processes":
|
case "--concurrent-processes":
|
||||||
case "--concurrent-downloads":
|
case "--concurrent-downloads":
|
||||||
|
|
Loading…
Reference in a new issue