add args
This commit is contained in:
parent
6de81f7fcd
commit
0aae4f51ab
Binary file not shown.
13
Program.cs
13
Program.cs
|
@ -17,8 +17,9 @@ namespace youtube_downloader
|
|||
class Program
|
||||
{
|
||||
|
||||
static void Main()
|
||||
static void Main(string[] arg)
|
||||
{
|
||||
|
||||
Thread t = new Thread(new ThreadStart(() => {
|
||||
Server.Functions.Downloader.DL.DownloadThread().GetAwaiter().GetResult();
|
||||
}));
|
||||
|
@ -191,7 +192,15 @@ namespace youtube_downloader
|
|||
|
||||
rp.AsFile(rq, path);
|
||||
});
|
||||
HttpServer.ListenAsync(3250, CancellationToken.None, Route.OnHttpRequestAsync).Wait();
|
||||
if (arg.Length > 0)
|
||||
{
|
||||
HttpServer.ListenAsync(arg[0], CancellationToken.None, Route.OnHttpRequestAsync).Wait();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
HttpServer.ListenAsync(3250, CancellationToken.None, Route.OnHttpRequestAsync).Wait();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue