add mDNS
This commit is contained in:
parent
89cb38b3d8
commit
e52e3498ce
|
@ -1,21 +1,14 @@
|
||||||
<Properties StartupConfiguration="{E26F8159-6B4B-4660-A7A4-D0333DFEF0DD}|Default" NuGet.AddPackagesDialog.IncludePrerelease="True">
|
<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>
|
<Files>
|
||||||
<File FileName="Site/YouTubeSite.cs" Line="13" Column="41" />
|
<File FileName="Program.cs" Line="22" Column="13" />
|
||||||
<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" />
|
|
||||||
</Files>
|
</Files>
|
||||||
<Pads>
|
<Pads>
|
||||||
<Pad Id="ProjectPad">
|
<Pad Id="ProjectPad">
|
||||||
<State name="__root__">
|
<State name="__root__">
|
||||||
<Node name="youtube-downloader" expanded="True">
|
<Node name="youtube-downloader" expanded="True">
|
||||||
<Node name="youtube-downloader" expanded="True">
|
<Node name="youtube-downloader" expanded="True">
|
||||||
|
<Node name="Properties" expanded="True" />
|
||||||
<Node name="Server" expanded="True">
|
<Node name="Server" expanded="True">
|
||||||
<Node name="Functions" expanded="True" />
|
<Node name="Functions" expanded="True" />
|
||||||
<Node name="Models" expanded="True" />
|
<Node name="Models" expanded="True" />
|
||||||
|
|
21
Program.cs
21
Program.cs
|
@ -10,6 +10,7 @@ using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using TessesYoutubeDownloader.Server.Models;
|
using TessesYoutubeDownloader.Server.Models;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using Makaretu.Dns;
|
||||||
|
|
||||||
namespace youtube_downloader
|
namespace youtube_downloader
|
||||||
{
|
{
|
||||||
|
@ -28,6 +29,23 @@ namespace youtube_downloader
|
||||||
Server.Functions.Downloader.DL.ListenForQueueItem().GetAwaiter().GetResult();
|
Server.Functions.Downloader.DL.ListenForQueueItem().GetAwaiter().GetResult();
|
||||||
}));
|
}));
|
||||||
t2.Start();
|
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 need to get our app name so that
|
||||||
// we can create unique names for our mutex and our pipe
|
// we can create unique names for our mutex and our pipe
|
||||||
string webSitePath = Server.Functions.Downloader.DL.GetPath(true, "WebSite");
|
string webSitePath = Server.Functions.Downloader.DL.GetPath(true, "WebSite");
|
||||||
|
@ -223,8 +241,11 @@ namespace youtube_downloader
|
||||||
|
|
||||||
rp.AsFile(rq, path);
|
rp.AsFile(rq, path);
|
||||||
});
|
});
|
||||||
|
Console.WriteLine("Almost Ready To Listen");
|
||||||
|
t3.Start();
|
||||||
if (arg.Length > 0)
|
if (arg.Length > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
HttpServer.ListenAsync(arg[0], CancellationToken.None, Route.OnHttpRequestAsync).Wait();
|
HttpServer.ListenAsync(arg[0], CancellationToken.None, Route.OnHttpRequestAsync).Wait();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
|
@ -1 +1 @@
|
||||||
e014680c7146ffd5391e681be8d2aaecc9460d86
|
d607a7342c320f7511cae09413e5de7e2242b37f
|
||||||
|
|
|
@ -127,3 +127,16 @@
|
||||||
/home/tom/site/obj/x86/Release/youtube-downloader.csproj.CoreCompileInputs.cache
|
/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.csproj.CopyComplete
|
||||||
/home/tom/site/obj/x86/Release/youtube-downloader.exe
|
/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
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -2,9 +2,16 @@
|
||||||
<packages>
|
<packages>
|
||||||
<package id="AngleSharp" version="0.14.0" targetFramework="net47" />
|
<package id="AngleSharp" version="0.14.0" targetFramework="net47" />
|
||||||
<package id="AsyncEnumerator" version="4.0.2" 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.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="MimeTypesMap" version="1.0.2" targetFramework="net47" />
|
||||||
<package id="Newtonsoft.Json" version="13.0.1" 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="Simple-HTTP" version="1.0.6" targetFramework="net47" />
|
||||||
<package id="System.Buffers" version="4.5.1" targetFramework="net47" />
|
<package id="System.Buffers" version="4.5.1" targetFramework="net47" />
|
||||||
<package id="System.IO" version="4.3.0" targetFramework="net47" />
|
<package id="System.IO" version="4.3.0" targetFramework="net47" />
|
||||||
|
|
|
@ -104,6 +104,26 @@
|
||||||
<HintPath>packages\AsyncEnumerator.4.0.2\lib\net461\AsyncEnumerable.dll</HintPath>
|
<HintPath>packages\AsyncEnumerator.4.0.2\lib\net461\AsyncEnumerable.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Web" />
|
<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>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Program.cs" />
|
<Compile Include="Program.cs" />
|
||||||
|
|
Loading…
Reference in New Issue