1
0
Fork 0
mirror of https://github.com/fiso64/slsk-batchdl.git synced 2024-12-22 22:42:41 +00:00
This commit is contained in:
fiso64 2024-05-17 22:32:51 +02:00
parent 4a3e8ddadb
commit 87fdff13cd

View file

@ -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":