This commit is contained in:
Michael Nolan 2021-08-26 05:44:54 -05:00
parent 89cb38b3d8
commit e52e3498ce
9 changed files with 65 additions and 11 deletions

View File

@ -1,21 +1,14 @@
<Properties StartupConfiguration="{E26F8159-6B4B-4660-A7A4-D0333DFEF0DD}|Default" NuGet.AddPackagesDialog.IncludePrerelease="True">
<MonoDevelop.Ide.Workbench ActiveDocument="Site/YouTubeSite.cs">
<MonoDevelop.Ide.Workbench ActiveDocument="Program.cs">
<Files>
<File FileName="Site/YouTubeSite.cs" Line="13" Column="41" />
<File FileName="../../../usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets" Line="2101" Column="5" />
<File FileName="Site/packages.config" Line="1" Column="1" />
<File FileName="ffmpeg.cs" Line="1" Column="1" />
<File FileName="Server/Models/SavedPlaylist.cs" Line="33" Column="57" />
<File FileName="packages.config" Line="1" Column="1" />
<File FileName="Program.cs" Line="178" Column="128" />
<File FileName="Server/Models/InfomationQueueItem.cs" Line="156" Column="90" />
<File FileName="Server/Functions/Downloader.cs" Line="637" Column="25" />
<File FileName="Program.cs" Line="22" Column="13" />
</Files>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="youtube-downloader" expanded="True">
<Node name="youtube-downloader" expanded="True">
<Node name="Properties" expanded="True" />
<Node name="Server" expanded="True">
<Node name="Functions" expanded="True" />
<Node name="Models" expanded="True" />

View File

@ -10,6 +10,7 @@ using System.Text;
using System.Threading;
using TessesYoutubeDownloader.Server.Models;
using Newtonsoft.Json;
using Makaretu.Dns;
namespace youtube_downloader
{
@ -28,6 +29,23 @@ namespace youtube_downloader
Server.Functions.Downloader.DL.ListenForQueueItem().GetAwaiter().GetResult();
}));
t2.Start();
Thread t3 = new Thread(new ThreadStart(() =>
{
int port = 3250;
if(arg.Length > 0)
{
Uri uri;
if(Uri.TryCreate(arg[0], UriKind.Absolute, out uri))
{
port = uri.Port;
}
}
var service = new ServiceProfile("tytd", "_tesses-services._tcp", (ushort)port);
var sd = new ServiceDiscovery();
sd.Advertise(service);
}));
// we need to get our app name so that
// we can create unique names for our mutex and our pipe
string webSitePath = Server.Functions.Downloader.DL.GetPath(true, "WebSite");
@ -223,8 +241,11 @@ namespace youtube_downloader
rp.AsFile(rq, path);
});
Console.WriteLine("Almost Ready To Listen");
t3.Start();
if (arg.Length > 0)
{
HttpServer.ListenAsync(arg[0], CancellationToken.None, Route.OnHttpRequestAsync).Wait();
}

Binary file not shown.

View File

@ -1 +1 @@
e014680c7146ffd5391e681be8d2aaecc9460d86
d607a7342c320f7511cae09413e5de7e2242b37f

View File

@ -127,3 +127,16 @@
/home/tom/site/obj/x86/Release/youtube-downloader.csproj.CoreCompileInputs.cache
/home/tom/site/obj/x86/Release/youtube-downloader.csproj.CopyComplete
/home/tom/site/obj/x86/Release/youtube-downloader.exe
/home/tom/site/bin/Release/Common.Logging.Core.dll
/home/tom/site/bin/Release/Common.Logging.dll
/home/tom/site/bin/Release/Makaretu.Dns.dll
/home/tom/site/bin/Release/Makaretu.Dns.Multicast.dll
/home/tom/site/bin/Release/SimpleBase.dll
/home/tom/site/bin/Release/System.Net.IPNetwork.dll
/home/tom/site/bin/Release/Common.Logging.Core.pdb
/home/tom/site/bin/Release/Common.Logging.pdb
/home/tom/site/bin/Release/Common.Logging.xml
/home/tom/site/bin/Release/SimpleBase.pdb
/home/tom/site/bin/Release/Makaretu.Dns.pdb
/home/tom/site/bin/Release/Makaretu.Dns.xml
/home/tom/site/bin/Release/Makaretu.Dns.Multicast.xml

View File

@ -2,9 +2,16 @@
<packages>
<package id="AngleSharp" version="0.14.0" targetFramework="net47" />
<package id="AsyncEnumerator" version="4.0.2" targetFramework="net47" />
<package id="Common.Logging" version="3.4.1" targetFramework="net47" />
<package id="Common.Logging.Core" version="3.4.1" targetFramework="net47" />
<package id="IPNetwork2" version="2.1.2" targetFramework="net47" />
<package id="Makaretu.Dns" version="2.0.1" targetFramework="net47" />
<package id="Makaretu.Dns.Multicast" version="0.27.0" targetFramework="net47" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="6.0.0-preview.7.21377.19" targetFramework="net47" />
<package id="Microsoft.CSharp" version="4.0.1" targetFramework="net47" />
<package id="MimeTypesMap" version="1.0.2" targetFramework="net47" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net47" />
<package id="SimpleBase" version="1.3.1" targetFramework="net47" />
<package id="Simple-HTTP" version="1.0.6" targetFramework="net47" />
<package id="System.Buffers" version="4.5.1" targetFramework="net47" />
<package id="System.IO" version="4.3.0" targetFramework="net47" />

View File

@ -104,6 +104,26 @@
<HintPath>packages\AsyncEnumerator.4.0.2\lib\net461\AsyncEnumerable.dll</HintPath>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Net.IPNetwork">
<HintPath>packages\IPNetwork2.2.1.2\lib\net46\System.Net.IPNetwork.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="Common.Logging.Core">
<HintPath>packages\Common.Logging.Core.3.4.1\lib\net40\Common.Logging.Core.dll</HintPath>
</Reference>
<Reference Include="Common.Logging">
<HintPath>packages\Common.Logging.3.4.1\lib\net40\Common.Logging.dll</HintPath>
</Reference>
<Reference Include="SimpleBase">
<HintPath>packages\SimpleBase.1.3.1\lib\net45\SimpleBase.dll</HintPath>
</Reference>
<Reference Include="Makaretu.Dns">
<HintPath>packages\Makaretu.Dns.2.0.1\lib\net45\Makaretu.Dns.dll</HintPath>
</Reference>
<Reference Include="Makaretu.Dns.Multicast">
<HintPath>packages\Makaretu.Dns.Multicast.0.27.0\lib\net461\Makaretu.Dns.Multicast.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />