add watch page

This commit is contained in:
Demetria Lovato 2021-06-25 04:03:09 -07:00
parent a1f3092159
commit b82a43be8f
6 changed files with 6 additions and 0 deletions

Binary file not shown.

View File

@ -153,6 +153,12 @@ namespace youtube_downloader
string json = JsonConvert.SerializeObject(Server.Functions.Downloader.GetProgress()); string json = JsonConvert.SerializeObject(Server.Functions.Downloader.GetProgress());
rp.AsText(json, "application/json"); rp.AsText(json, "application/json");
}); });
Route.Add("/api/Watch/{VideoId}", (rq, rp, args) =>
{
var txt = Templating.RenderFile(Path.Combine(webSitePath, "watch_page.thtml"), args); //populate template
rp.AsText(txt);
});
Route.Add("/api/Redownload", (rq, rp, args) => Route.Add("/api/Redownload", (rq, rp, args) =>
{ {
foreach (var item in Directory.GetFiles(Server.Functions.Downloader.DL.GetPath(true, "Info"), "*.json")) foreach (var item in Directory.GetFiles(Server.Functions.Downloader.DL.GetPath(true, "Info"), "*.json"))

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.