subtitles and sort by fav

This commit is contained in:
Jon Dough
2024-03-18 08:07:46 +00:00
parent db1334e4d9
commit 96da42f1cf
4 changed files with 56 additions and 21 deletions

View File

@@ -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";