From 87d7c6198d9d2c5bf51a189bc88f715d8da64141 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Sat, 11 May 2024 22:13:27 +0200 Subject: feat(users/Profpatsch/whatcd-resolver): trivial artist page Change-Id: I2c0dd1a3f300b46fec8b38c310dc08ea2f5f2492 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11648 Autosubmit: Profpatsch Reviewed-by: Profpatsch Tested-by: BuildkiteCI --- users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'users/Profpatsch') diff --git a/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs b/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs index 8843a78729c4..28aa0f2b10da 100644 --- a/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs +++ b/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs @@ -208,6 +208,16 @@ htmlUi = do jsonld <- httpGetJsonLd (qry.target) pure $ renderJsonld jsonld ), + ( "artist", + respond.html $ \span -> do + qry <- + parseQueryArgs + span + ( label @"dbId" + <$> (singleQueryArgument "db_id" Field.utf8) + ) + pure $ [fmt|Artist ID: {qry.dbId}|] + ), ( "autorefresh", respond.plain $ do qry <- @@ -455,11 +465,16 @@ getBestTorrentsTable = do fresh & foldMap ( \b -> do + let artistLink :: Text = [fmt|/artist?db_id={b.groupId}|] [hsx| {localTorrent b} {Html.toHtml @Int b.groupId} - {Html.toHtml @Text b.torrentGroupJson.artist} + + + {Html.toHtml @Text b.torrentGroupJson.artist} + + {Html.toHtml @Text b.torrentGroupJson.groupName} {Html.toHtml @Int b.seedingWeight}
-- cgit 1.4.1