webmusic/Pages/lyrics.cshtml
2023-06-01 01:57:55 +02:00

19 lines
448 B
Plaintext

@page
@using System.IO
@model IndexModel
@{
ViewData["Title"] = $"{Model.Path.Split("/").Last()} ~ webmusic on .NET {Environment.Version}";
}
@if (Model.Path.Contains("/..")) {
return;
}
@if (!Model.Path.EndsWith(".lrc")) {
Response.Redirect("/" + Request.QueryString);
return;
}
@{
Layout = "Shared/_LayoutNojs";
}
<h3>@Model.Path</h3>
<p>@Html.Raw((await System.IO.File.ReadAllTextAsync("music" + Model.Path)).Replace("\n", "<br/>"))</p>