diff --git a/TYTD.Api/MyClass.cs b/TYTD.Api/MyClass.cs index 7bc0fc2..8f863f3 100644 --- a/TYTD.Api/MyClass.cs +++ b/TYTD.Api/MyClass.cs @@ -170,14 +170,12 @@ namespace TYTD b.Append($"{link.Key}
"); } b.Append(""); - Dictionary templating = new Dictionary(); - templating.Add("Items", b.ToString()); - Page= Templating.RenderFile(Path.Combine("WebSite", "extensions.html"),templating); + } - internal static void Load(string dll,string confpath) + internal static void Load(StringBuilder b,string dll,string confpath) { var asm=Assembly.LoadFrom(dll); - StringBuilder b = new StringBuilder(); + foreach (var item in asm.GetTypes()) { if(typeof(Api).IsAssignableFrom(item)) @@ -193,6 +191,7 @@ namespace TYTD } public static void Init() { + StringBuilder b = new StringBuilder(); string root = Path.Combine(Environment.CurrentDirectory,"config", "apidll"); string appconfroot = Path.Combine(Environment.CurrentDirectory,"config", "apistore"); foreach(var dir in Directory.GetDirectories(root)) @@ -203,9 +202,12 @@ namespace TYTD if(File.Exists(dllpath)) { Directory.CreateDirectory(confpath); - Load(dllpath, confpath); + Load(b,dllpath, confpath); } } + Dictionary templating = new Dictionary(); + templating.Add("Items", b.ToString()); + Page = Templating.RenderFile(Path.Combine("WebSite", "extensions.html"), templating); } } } diff --git a/TYTD.Api/bin/Release/TYTD.Api.dll b/TYTD.Api/bin/Release/TYTD.Api.dll index 813ef5f..e8d4db5 100644 Binary files a/TYTD.Api/bin/Release/TYTD.Api.dll and b/TYTD.Api/bin/Release/TYTD.Api.dll differ diff --git a/TYTD.Api/obj/Release/TYTD.Api.csprojAssemblyReference.cache b/TYTD.Api/obj/Release/TYTD.Api.csprojAssemblyReference.cache index 2ac38fe..1d4fce0 100644 Binary files a/TYTD.Api/obj/Release/TYTD.Api.csprojAssemblyReference.cache and b/TYTD.Api/obj/Release/TYTD.Api.csprojAssemblyReference.cache differ diff --git a/TYTD.Api/obj/Release/TYTD.Api.dll b/TYTD.Api/obj/Release/TYTD.Api.dll index 813ef5f..e8d4db5 100644 Binary files a/TYTD.Api/obj/Release/TYTD.Api.dll and b/TYTD.Api/obj/Release/TYTD.Api.dll differ diff --git a/bin/Release/TYTD.Api.dll b/bin/Release/TYTD.Api.dll index 813ef5f..e8d4db5 100644 Binary files a/bin/Release/TYTD.Api.dll and b/bin/Release/TYTD.Api.dll differ diff --git a/bin/Release/youtube-downloader.exe b/bin/Release/youtube-downloader.exe index 2af2e8c..ca039a3 100644 Binary files a/bin/Release/youtube-downloader.exe and b/bin/Release/youtube-downloader.exe differ diff --git a/obj/x86/Release/youtube-downloader.csprojAssemblyReference.cache b/obj/x86/Release/youtube-downloader.csprojAssemblyReference.cache index e3e0432..3d9564e 100644 Binary files a/obj/x86/Release/youtube-downloader.csprojAssemblyReference.cache and b/obj/x86/Release/youtube-downloader.csprojAssemblyReference.cache differ diff --git a/obj/x86/Release/youtube-downloader.exe b/obj/x86/Release/youtube-downloader.exe index 2af2e8c..ca039a3 100644 Binary files a/obj/x86/Release/youtube-downloader.exe and b/obj/x86/Release/youtube-downloader.exe differ