Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: campaign_ensure_chapter incorrect due to slow animation #3676

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions module/campaign/campaign_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,20 @@ def campaign_ensure_chapter(self, index, skip_first_screenshot=True):
logger.attr("Index", current)
diff = index - current
if diff == 0:
break

# index=4, current=4, actual=14
error_confirm.start()
if not error_confirm.reached():
continue
else:
break
# 14-4 may be OCR as 4-1 due to slow animation, confirm if it is 4-1
if index >= 11 and index % 10 == current:
# index=14, current=4, actual=14
elif index >= 11 and index % 10 == current:
error_confirm.start()
if not error_confirm.reached():
continue
else:
error_confirm.reset()
error_confirm.clear()

# Switch
if retry.reached():
Expand Down