about summary refs log tree commit diff
path: root/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2024-05-16T22·05+0200
committerclbot <clbot@tvl.fyi>2024-06-03T14·55+0000
commit8bb27c98b0a191d4cae76bdc79f0d5167e9968ba (patch)
tree46eaafc9a4b031ea7466832436df79f1d11b2918 /users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs
parent94ea6fd69ec0b2cefaaf2b46c423319643043695 (diff)
feat(users/Profpatsch/whatcd-resolver): add redacted torrent link r/8207
Change-Id: I9e2cd1935a67260cc7e4b72b247c01495e130949
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11744
Autosubmit: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs')
-rw-r--r--users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs b/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs
index 2960986079a5..83956902b7a3 100644
--- a/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs
+++ b/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs
@@ -3,6 +3,7 @@
 module WhatcdResolver where
 
 import AppT
+import Arg
 import Control.Category qualified as Cat
 import Control.Monad.Catch.Pure (runCatch)
 import Control.Monad.Logger.CallStack
@@ -539,7 +540,11 @@ getBestTorrentsTable artistFilter = do
                   <td>
                     {artists}
                   </td>
-                  <td>{Html.toHtml @Text b.torrentGroupJson.groupName}</td>
+                  <td>
+                    <a href={mkRedactedTorrentLink (Arg b.torrentId)}>
+                      {Html.toHtml @Text b.torrentGroupJson.groupName}
+                    </a>
+                  </td>
                   <td>{Html.toHtml @Int b.seedingWeight}</td>
                   <td><details hx-trigger="toggle once" hx-post="snips/redacted/torrentDataJson" hx-vals={Enc.encToBytesUtf8 $ Enc.object [("torrent-id", Enc.int b.torrentId)]}></details></td>
                   </tr>