fix(users/Profpatsch/whatcd-resolver): db_id -> redacted_id

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
This commit is contained in:
Profpatsch 2024-05-16 22:59:21 +02:00 committed by clbot
parent 54ea3eeacb
commit 94ea6fd69e
2 changed files with 10 additions and 10 deletions

View file

@ -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