Skip to content

Commit

Permalink
Fix passport icons count logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-JL committed Sep 7, 2024
1 parent cc91a38 commit 7439730
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions indexer/src/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,16 @@ def parse(self, packpath: str) -> Pack:
icons += 1
elif icon.is_file() and icon.suffix in (".png", ".bmx"):
if icon_set.name == "Passport":
parts = icon.name.split("_")
if len(parts) < 3: # passport_128x64
if icon.stem == "passport_128x64":
passport.add("Background")
elif icon.stem in (
"passport_bad_46x49",
"passport_happy_46x49",
"passport_okay_46x49",
):
passport.add(icon.stem.split("_")[1].title())
else:
passport.add(parts[1].title())
icons += 1
else:
icons += 1
if (pack_entry / "Fonts").is_dir():
Expand Down

0 comments on commit 7439730

Please sign in to comment.