diff --git a/.vs/youtube-downloader/xs/UserPrefs.xml b/.vs/youtube-downloader/xs/UserPrefs.xml
index 65dc63e..36fbc28 100644
--- a/.vs/youtube-downloader/xs/UserPrefs.xml
+++ b/.vs/youtube-downloader/xs/UserPrefs.xml
@@ -7,7 +7,7 @@
-
+
diff --git a/Program.cs b/Program.cs
index 99cd211..b938d8d 100644
--- a/Program.cs
+++ b/Program.cs
@@ -264,7 +264,11 @@ namespace TYTD
foreach (var item in Directory.GetFiles(Downloader.DL.GetPath(true, "Info"), "*.json"))
{
string id =Path.GetFileNameWithoutExtension(item);
- Downloader.DownloadVideo(id, Resolution.NoConvert);
+ if(!File.Exists(Path.Combine("NotConverted",$"{id}.mp4")))
+ {
+ Downloader.DownloadVideo(id, Resolution.NoConvert);
+ }
+
}
rq.RedirectIt(rp);
@@ -272,10 +276,20 @@ namespace TYTD
public static void RedownloadRes(HttpListenerRequest rq, HttpListenerResponse rp, Dictionary args)
{
+ int res=int.Parse(args["R"]);
+ if(res > 2)
+ {
+ rq.RedirectIt(rp);
+ return;
+ }
+ string res_str = new[]{"Converted","NotConverted","Audio"}[res];
foreach (var item in Directory.GetFiles(Downloader.DL.GetPath(true, "Info"), "*.json"))
{
- string id = System.IO.Path.GetFileNameWithoutExtension(item);
- Downloader.DownloadVideo(id, (Resolution)int.Parse(args["R"]));
+ string id = Path.GetFileNameWithoutExtension(item);
+ if (!File.Exists(Path.Combine(res_str, $"{id}.mp4")))
+ {
+ Downloader.DownloadVideo(id, (Resolution)res);
+ }
}
rq.RedirectIt(rp);
diff --git a/TYTD.Api/obj/Release/TYTD.Api.csprojAssemblyReference.cache b/TYTD.Api/obj/Release/TYTD.Api.csprojAssemblyReference.cache
index 4aee228..63ac678 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/bin/Release/youtube-downloader.exe b/bin/Release/youtube-downloader.exe
index ff7b008..c2eb7fe 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 2871d8b..a96666b 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 ff7b008..c2eb7fe 100644
Binary files a/obj/x86/Release/youtube-downloader.exe and b/obj/x86/Release/youtube-downloader.exe differ