Skip to content

Commit 0e37402

Browse files
committed
Skip expensive missing image (first) check when possible + BUILD
If refreshing some selected games, or if archived and we're not refreshign archived games, skip image check
1 parent 4f29ec5 commit 0e37402

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

modules/api.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,11 +1344,12 @@ async def refresh(*games: list[Game], full=False, notifs=True, force_archived=Fa
13441344
for game in (games or globals.games.values()):
13451345
if game.custom:
13461346
continue
1347-
if not game.image.missing:
1348-
if not games and game.archived and not globals.settings.refresh_archived_games and not force_archived:
1349-
continue
1350-
if not games and game.status is Status.Completed and not globals.settings.refresh_completed_games and not force_completed:
1347+
if not games:
1348+
if game.archived and not globals.settings.refresh_archived_games and not force_archived:
13511349
continue
1350+
if not game.image.missing:
1351+
if game.status is Status.Completed and not globals.settings.refresh_completed_games and not force_completed:
1352+
continue
13521353
if len(fast_queue[-1]) == api_fast_check_max_ids:
13531354
fast_queue.append([])
13541355
fast_queue[-1].append(game)

0 commit comments

Comments
 (0)