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