Fix: Unknown stage name should not be considered as any chapter

This commit is contained in:
LmeSzinc 2023-11-01 01:21:51 +08:00
parent ab014c86a7
commit d3c8221e14
2 changed files with 2 additions and 3 deletions

View File

@ -38,8 +38,7 @@ class CampaignBase(CampaignBase_):
elif name[-1].isdigit():
return name[:-1], name[-1]
logger.warning(f'Unknown stage name: {name}')
return name[0], name[1:]
return CampaignBase_._campaign_separate_name(name)
@staticmethod
def _campaign_get_chapter_index(name):

View File

@ -73,7 +73,7 @@ class CampaignOcr(ModuleBase):
return '', ''
logger.warning(f'Unknown stage name: {name}')
return name[0], name[1:]
return '', ''
def campaign_match_multi(self, template, image, stage_image=None, name_offset=(75, 9), name_size=(60, 16),
name_letter=(255, 255, 255), name_thresh=128, similarity=0.85):