about summary refs log tree commit diff
path: root/users/Profpatsch/whatcd-resolver/src/Redacted.hs
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2024-05-16T20·59+0200
committerclbot <clbot@tvl.fyi>2024-06-03T14·55+0000
commit94ea6fd69ec0b2cefaaf2b46c423319643043695 (patch)
treeed472aa1e627ddeef246b32370c4f52a3f5b8263 /users/Profpatsch/whatcd-resolver/src/Redacted.hs
parent54ea3eeacb39e127f4db596c7161afc426c0bd20 (diff)
fix(users/Profpatsch/whatcd-resolver): db_id -> redacted_id r/8206
We’re using the redacted id, not the database id.
This is more stable.

Change-Id: I4d24e5bc6cc469d811cb1402a83157359576ef77
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11683
Autosubmit: Profpatsch <mail@profpatsch.de>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/Profpatsch/whatcd-resolver/src/Redacted.hs')
-rw-r--r--users/Profpatsch/whatcd-resolver/src/Redacted.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/users/Profpatsch/whatcd-resolver/src/Redacted.hs b/users/Profpatsch/whatcd-resolver/src/Redacted.hs
index 1363d1677231..e5dc29aef98b 100644
--- a/users/Profpatsch/whatcd-resolver/src/Redacted.hs
+++ b/users/Profpatsch/whatcd-resolver/src/Redacted.hs
@@ -389,7 +389,7 @@ getTorrentById dat = do
 
 data GetBestTorrentsFilter = GetBestTorrentsFilter
   { onlyDownloaded :: Bool,
-    onlyArtist :: Maybe (Label "artistId" Natural)
+    onlyArtist :: Maybe (Label "redactedId" Natural)
   }
 
 -- | Find the best torrent for each torrent group (based on the seeding_weight)
@@ -429,7 +429,7 @@ getBestTorrents opts = do
     ( do
         let (onlyArtistB, onlyArtistId) = case opts.onlyArtist of
               Nothing -> (True, 0)
-              Just a -> (False, a.artistId)
+              Just a -> (False, a.redactedId)
         ( opts.onlyDownloaded :: Bool,
           onlyArtistB :: Bool,
           onlyArtistId & fromIntegral @Natural @Int