Ver código fonte

force all media response as video/mp4 for play in browser instead of download

HOME 2 anos atrás
pai
commit
940906008c
1 arquivos alterados com 9 adições e 9 exclusões
  1. 9 9
      FNZCM/FNZCM.ConHost/Ver2/Program2.cs

+ 9 - 9
FNZCM/FNZCM.ConHost/Ver2/Program2.cs

@@ -239,10 +239,10 @@ namespace FNZCM.ConHost.Ver2
                     sb.Append($"<title> Libraries - {ConfigFile.Instance.Title} </title>");
                     sb.Append("<body bgColor=skyBlue style=font-size:3vh>");
 
-                    if (_isLoading) sb.Append("<h2 style=position:fixed;right:0px;top:0px;margin:0>Still Loading...</h2>");
+                    if (_isLoading) sb.Append("<h4 style=position:fixed;right:0px;top:0px;margin:0>Still Loading...</h4>");
 
-                    sb.Append($"<h1>{ConfigFile.Instance.Title}</h1>");
-                    sb.Append("<h1>Libraries</h1>");
+                    sb.Append($"<h2>{ConfigFile.Instance.Title}</h2>");
+                    sb.Append("<h3>Libraries</h3>");
 
                     sb.Append("<ul>");
                     foreach (var library in Libraries.OrderBy(p => p.Key))
@@ -297,7 +297,7 @@ namespace FNZCM.ConHost.Ver2
 
                         sb.Append($"<body bgColor=skyBlue>");
 
-                        if (_isLoading) sb.Append("<h2 style=position:fixed;right:0px;top:0px;margin:0>Still Loading...</h2>");
+                        if (_isLoading) sb.Append("<h4 style=position:fixed;right:0px;top:0px;margin:0>Still Loading...</h4>");
 
                         sb.Append($"<h1>Discs of {l.Name}</h1>");
                         sb.Append("<div><a href=/>Back to home</a></div>");
@@ -357,7 +357,7 @@ namespace FNZCM.ConHost.Ver2
                         sb.Append("<!DOCTYPE html><html lang=\"zh-cn\"><meta charset=\"UTF-8\">");
                         sb.Append($"<body bgColor=skyBlue style=font-size:2vh>");
 
-                        if (_isLoading) sb.Append("<h2 style=position:fixed;right:0px;top:0px;margin:0>Still Loading...</h2>");
+                        if (_isLoading) sb.Append("<h4 style=position:fixed;right:0px;top:0px;margin:0>Still Loading...</h4>");
 
                         sb.Append($"<h2>Tracks of</h2><h1>{alb.Name}</h1>");
                         sb.Append($"<div><a href='/list/{libName.FuckVlcAndEscape()}/'>Back to library</a></div>");
@@ -426,7 +426,7 @@ namespace FNZCM.ConHost.Ver2
                         sb.Append("<!DOCTYPE html><html lang=\"zh-cn\"><meta charset=\"UTF-8\">");
                         sb.Append($"<body bgColor=skyBlue style=font-size:2vh>");
 
-                        if (_isLoading) sb.Append("<h2 style=position:fixed;right:0px;top:0px;margin:0>Still Loading...</h2>");
+                        if (_isLoading) sb.Append("<h4 style=position:fixed;right:0px;top:0px;margin:0>Still Loading...</h4>");
 
                         sb.Append($"<h2>BK of </h2><h1>{alb.Name}</h1>");
                         sb.Append($"<div><a href='/list/{libName.FuckVlcAndEscape()}/'>Back to library</a></div>");
@@ -532,9 +532,9 @@ namespace FNZCM.ConHost.Ver2
                     switch (pathParts.FirstOrDefault())
                     {
                         default: context.Response.ContentType = "video/mp4"; break;
-                        case "media":
-                            context.Response.ContentType = $"audio/{requestPath?.Split('.').LastOrDefault() ?? "flac"}";
-                            break;
+                        //case "media":
+                        //    context.Response.ContentType = $"audio/{requestPath?.Split('.').LastOrDefault() ?? "flac"}";
+                        //    break;
                         case "cover":
                         case "bk":
                             context.Response.ContentType = $"image/{requestPath?.Split('.').LastOrDefault() ?? "jpg"}";