Improve log display
This commit is contained in:
parent
9f595e98a3
commit
08a945c80b
|
@ -4,7 +4,7 @@
|
|||
@model IndexModel
|
||||
@{
|
||||
if (Model.LogConditionsMet)
|
||||
ViewData["Title"] = $"{HttpUtility.UrlDecode(Model.LogArtist)} - {HttpUtility.UrlDecode(Model.LogAlbum)} ~ webmusic on .NET {Environment.Version}";
|
||||
ViewData["Title"] = $"{Model.LogDisplay} ~ webmusic on .NET {Environment.Version}";
|
||||
else
|
||||
ViewData["Title"] = $"{Model.Displaypath} ~ webmusic on .NET {Environment.Version}";
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@ namespace webmusic.Pages {
|
|||
public bool LogConditionsMet;
|
||||
public string LogArtist;
|
||||
public string LogAlbum;
|
||||
public string LogDisplay;
|
||||
public string LogUrl;
|
||||
public string CopyArtist;
|
||||
public string CopyAlbum;
|
||||
|
@ -56,6 +57,7 @@ namespace webmusic.Pages {
|
|||
CopyArtist = pathparts[Index.FromEnd(2)].Replace("'", "\\'");;
|
||||
LogAlbum = HttpUtility.UrlPathEncode(pathparts[Index.FromEnd(1)]).Replace("'", "\\'").Replace("&", "%26");
|
||||
LogArtist = HttpUtility.UrlPathEncode(pathparts[Index.FromEnd(2)]).Replace("'", "\\'").Replace("&", "%26");
|
||||
LogDisplay = $"{pathparts[Index.FromEnd(2)]} - {pathparts[Index.FromEnd(1)]}";
|
||||
LogUrl = Request.GetEncodedUrl().Replace("'", "\\'").Replace("&", "%26");
|
||||
LogConditionsMet = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue