@page
@using System.IO
@using System.Web
@model IndexModel
@{
if (Model.LogConditionsMet)
ViewData["Title"] = $"{Model.LogDisplay} ~ webmusic on .NET {Environment.Version}";
else
ViewData["Title"] = $"{Model.Displaypath} ~ webmusic on .NET {Environment.Version}";
}
@if (Model.Path.Contains("/..")) {
return;
}
@if (Model.Path.EndsWith(".lrc")) {
Layout = "Shared/_LayoutNojs";
@Model.Path
@Html.Raw((await System.IO.File.ReadAllTextAsync("music" + Model.Path)).Replace("\n", "
"))
}
else {
@Model.Displaypath [RC]
[..]
Go back
[--]
Download playlist
@if (Model.LogConditionsMet) {
[--]
Log playback
/
Copy #np
/
Copy journal (full)
/
Copy journal (album only)
}
@foreach (var dir in Model.Dirs) {
[--]
@dir
}
@foreach (var file in Model.Files) {
var basename = System.IO.Path.GetFileNameWithoutExtension(file);
var lrcfile = basename + ".lrc";
var lrcpath = System.IO.Path.Combine(Model.Fullpath, lrcfile);
[DL]
@if (System.IO.File.Exists(lrcpath)) {
[LRC]
}
else if (Directory.GetFiles(Model.Fullpath, "*.lrc").Length != 0) {
[---]
}
@file
}
}