MCPcopy
hub / github.com/xlenore/psx-covers / main

Function main

tools/update_cover_size.py:73–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71
72
73def main():
74 main_root = Path(__file__).parent.parent.resolve()
75 covers_dir = main_root / "covers" / "default"
76
77 try:
78 invalid_list = find_invalid_covers(covers_dir, TARGET_SIZE)
79 except FileNotFoundError as e:
80 print(e)
81 return
82
83 if invalid_list:
84 for n in invalid_list:
85 print(" -", n)
86 print(f"Found {len(invalid_list)} images with size different from {TARGET_SIZE}:")
87 input(f"Press Enter to update {len(invalid_list)} images to the correct size...")
88 update_cover_sizes(covers_dir, TARGET_SIZE, invalid_list)
89
90 else:
91 print(f"All images in {covers_dir} have size {TARGET_SIZE}.")
92
93
94if __name__ == "__main__":

Callers 1

Calls 2

find_invalid_coversFunction · 0.85
update_cover_sizesFunction · 0.85

Tested by

no test coverage detected