refactor(users/Profpatsch/whatcd-resolver): split table data fetch
Change-Id: Ic9b2f1e6a5ff0c65b93c1662bad75fb41c86bfcd Reviewed-on: https://cl.tvl.fyi/c/depot/+/11759 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de> Autosubmit: Profpatsch <mail@profpatsch.de>
This commit is contained in:
parent
d0ab3c8d15
commit
1b887b43da
2 changed files with 40 additions and 25 deletions
|
|
@ -386,7 +386,7 @@ getTorrentById dat = do
|
|||
|
||||
data GetBestTorrentsFilter = GetBestTorrentsFilter
|
||||
{ onlyDownloaded :: Bool,
|
||||
onlyArtist :: Maybe (Label "redactedId" Natural)
|
||||
onlyArtist :: Maybe (Label "artistRedactedId" Natural)
|
||||
}
|
||||
|
||||
-- | Find the best torrent for each torrent group (based on the seeding_weight)
|
||||
|
|
@ -426,7 +426,7 @@ getBestTorrents opts = do
|
|||
( do
|
||||
let (onlyArtistB, onlyArtistId) = case opts.onlyArtist of
|
||||
Nothing -> (True, 0)
|
||||
Just a -> (False, a.redactedId)
|
||||
Just a -> (False, a.artistRedactedId)
|
||||
( opts.onlyDownloaded :: Bool,
|
||||
onlyArtistB :: Bool,
|
||||
onlyArtistId & fromIntegral @Natural @Int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue