mirror of
https://onedev.site.tesses.net/tytd2025
synced 2026-02-09 01:55:46 +00:00
25 lines
512 B
Plaintext
25 lines
512 B
Plaintext
func Pages.Artist(music,ctx)
|
|
{
|
|
|
|
var id = ctx.QueryParams.TryGetFirst("id");
|
|
var res = music.GetArtistsAlbums(id);
|
|
|
|
if(TypeOf(id) != "String")
|
|
{
|
|
return Components.Shell("Error",<h1>Artist id not specified</h1>,pages);
|
|
}
|
|
|
|
|
|
var html = <null>
|
|
<h1>{res.name}</h1>
|
|
<ul>
|
|
<each(var item : res.items)>
|
|
<li><raw(Components.MusicAlbum(item))></li>
|
|
</each>
|
|
</ul>
|
|
</null>;
|
|
|
|
|
|
return Components.Shell($"Artist {res.name}",html,2);
|
|
|
|
} |