()
| 71 | |
| 72 | |
| 73 | def 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 | |
| 94 | if __name__ == "__main__": |
no test coverage detected