From 96da42f1cfa1a78fc41b6c39b37f6fa666dc023c Mon Sep 17 00:00:00 2001 From: Jon Dough <49297268+stjet@users.noreply.github.com> Date: Mon, 18 Mar 2024 08:07:46 +0000 Subject: [PATCH] subtitles and sort by fav --- host.ts | 5 ++- templates/components/listing.html | 2 +- templates/index.html | 9 +++++ templates/player.html | 61 +++++++++++++++++++++---------- 4 files changed, 56 insertions(+), 21 deletions(-) diff --git a/host.ts b/host.ts index 1ab9588..13b8963 100644 --- a/host.ts +++ b/host.ts @@ -33,7 +33,7 @@ createServer((req, res) => { req_path = path.join(__dirname, "build", decodeURI(req.url), "index.html"); } else { //is file - if (url_obj.pathname.startsWith("/anime_assets") || url_obj.pathname.startsWith("/manga_assets") || url_obj.pathname.startsWith("/music_assets")) { + if (url_obj.pathname.startsWith("/anime_assets") || url_obj.pathname.startsWith("/manga_assets") || url_obj.pathname.startsWith("/music_assets") || url_obj.pathname.startsWith("/music_subtitle_assets")) { req_path = path.join(__dirname, "static_assets", decodeURI(req.url)); } else { req_path = path.join(__dirname, "build", decodeURI(req.url)); @@ -97,6 +97,9 @@ createServer((req, res) => { case "xml": content_type = "text/xml"; break; + case "vtt": + content_type = "text/vtt"; + break; case "png": case "ico": content_type = "image/png"; diff --git a/templates/components/listing.html b/templates/components/listing.html index f3ddd8c..4bb0d40 100644 --- a/templates/components/listing.html +++ b/templates/components/listing.html @@ -1 +1 @@ -