@page @using System.Web @model IndexModel @{ ViewData["Title"] = "webmusic"; var path = HttpUtility.UrlDecode(Request.QueryString.Value.TrimStart('?')); if (path.EndsWith(".m3u")) { Layout = null; Response.ContentType = "text/plain"; } } @if (Model.path.Contains("..")) { return; } @if (path.EndsWith(".m3u")) { @foreach (var file in Model.files) { @Html.Raw(Request.Scheme + "://" + Request.Host + "/" + Model.fullpath + "/" + file.Replace("?", "%3F") +"\n") } } else {

@Model.displaypath

[..] Go back
[--] Download m3u

@foreach (var dir in Model.dirs) { [--] @dir
} @foreach (var file in Model.files) { var jspath = Model.Encode(Model.fullpath); var jsfile = jspath + "/" + Model.Encode(file); [DL] @file
} }