feat(users/Profpatsch/whatcd-resolver): Prefer remasters

Usually remasters just … sound better. Thus let’s give them a boost in
the selection score. In case they are horrible they should have
significantly less people seeding them and less snatches than their
originals anyway (maybe the multiplier should be 1.5 or 2 instead?)

Change-Id: I6817091f42b7bcb75eaf57a6aa635b5ba468f99e
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9014
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
Autosubmit: Profpatsch <mail@profpatsch.de>
This commit is contained in:
Profpatsch 2023-08-07 15:58:06 +02:00 committed by clbot
parent 3e5a2ea57f
commit 8dac21b444

View file

@ -825,8 +825,16 @@ migrate = do
t.torrent_id,
t.torrent_group,
-- the seeding weight is used to find the best torrent in a group.
( (full_json_result->'seeders')::integer*3
+ (full_json_result->'snatches')::integer)
( ((full_json_result->'seeders')::integer*3
+ (full_json_result->'snatches')::integer
)
-- prefer remasters by multiplying them with 3
* (CASE
WHEN full_json_result->>'remasterTitle' ILIKE '%remaster%'
THEN 3
ELSE 1
END)
)
AS seeding_weight,
t.full_json_result,
t.torrent_file,