Skip to content

Commit c95b5b5

Browse files
committed
only set hltb if some properties exist
1 parent 3d698c0 commit c95b5b5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

backend/handler/metadata/hltb_handler.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,16 @@ async def get_rom(self, fs_name: str, platform_slug: str) -> HLTBRom:
409409
(game for game in games if game["game_name"] == best_match), None
410410
)
411411

412-
if best_game:
412+
if (
413+
best_game
414+
and best_game["game_id"]
415+
and (
416+
best_game["comp_main"]
417+
or best_game["comp_plus"]
418+
or best_game["comp_100"]
419+
or best_game["comp_all"]
420+
)
421+
):
413422
log.debug(
414423
f"Found HowLongToBeat match for '{search_term}' -> '{best_match}' (score: {best_score:.3f})"
415424
)

0 commit comments

Comments
 (0)