From ea89572f98bf259f489d5f1c29f84ca6c31c25fa Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 3 Jun 2024 00:17:40 +0200 Subject: fix(users/Profpatsch/whatcd-resolver): fix torrent link The redacted URL needs the torrent group id to go to the album page, not the torrent id. Also open the external link in a separate tab. Change-Id: Ie6d73cb02137855bb388859d2800968cd56ece49 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11745 Reviewed-by: Profpatsch Tested-by: BuildkiteCI Autosubmit: Profpatsch --- users/Profpatsch/whatcd-resolver/src/Redacted.hs | 2 +- users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'users/Profpatsch') diff --git a/users/Profpatsch/whatcd-resolver/src/Redacted.hs b/users/Profpatsch/whatcd-resolver/src/Redacted.hs index b2cef8bc2132..c8182a8cabdf 100644 --- a/users/Profpatsch/whatcd-resolver/src/Redacted.hs +++ b/users/Profpatsch/whatcd-resolver/src/Redacted.hs @@ -68,7 +68,7 @@ redactedGetTorrentFile dat = inSpan' "Redacted Get Torrent File" $ \span -> do ) httpTorrent span req -mkRedactedTorrentLink :: Arg "torrentId" Int -> Text +mkRedactedTorrentLink :: Arg "torrentGroupId" Int -> Text mkRedactedTorrentLink torrentId = [fmt|https://redacted.ch/torrents.php?id={torrentId.unArg}|] exampleSearch :: (MonadThrow m, MonadLogger m, MonadPostgres m, MonadOtel m) => m (Transaction m ()) diff --git a/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs b/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs index 83956902b7a3..65d84b684c72 100644 --- a/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs +++ b/users/Profpatsch/whatcd-resolver/src/WhatcdResolver.hs @@ -541,7 +541,7 @@ getBestTorrentsTable artistFilter = do {artists} - + {Html.toHtml @Text b.torrentGroupJson.groupName} -- cgit 1.4.1