Skip to content

Commit

Permalink
add some artwork, rename some zips
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Mattiello <[email protected]>
  • Loading branch information
JoeMatt committed Dec 21, 2024
1 parent f15ca01 commit 1128590
Show file tree
Hide file tree
Showing 41 changed files with 1,133 additions and 1,063 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed ROMs/com.provenance.gb/demo-cover.jpg
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ROMs/com.provenance.genesis/Old Towers-cover.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
1,052 changes: 526 additions & 526 deletions index.html

Large diffs are not rendered by default.

1,117 changes: 587 additions & 530 deletions roms_mapping.json

Large diffs are not rendered by default.

27 changes: 20 additions & 7 deletions scan_roms.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ def scan_roms_folder(base_path: str) -> Dict:
base = Path(base_path)
mapping = {}

# Define supported image formats
image_formats = ['.jpg', '.jpeg', '.png']

# Scan each system folder
for system_dir in base.iterdir():
if not system_dir.is_dir():
Expand All @@ -157,21 +160,31 @@ def scan_roms_folder(base_path: str) -> Dict:
"size": file_path.stat().st_size
}

# Check for artwork
# Check for artwork in different formats
artwork = {}
cover_path = file_path.with_name(f"{rom_base}-cover.jpg")
screenshot_path = file_path.with_name(f"{rom_base}-screenshot.jpg")

if cover_path.exists():
artwork["cover"] = cover_path.name
if screenshot_path.exists():
artwork["screenshot"] = screenshot_path.name
# Check for cover art
for fmt in image_formats:
cover_path = file_path.with_name(f"{rom_base}-cover{fmt}")
if cover_path.exists():
artwork["cover"] = cover_path.name
break

# Check for screenshot
for fmt in image_formats:
screenshot_path = file_path.with_name(f"{rom_base}-screenshot{fmt}")
if screenshot_path.exists():
artwork["screenshot"] = screenshot_path.name
break

if artwork:
rom_info["artwork"] = artwork

roms_list.append(rom_info)

# Sort roms alphabetically by filename
roms_list.sort(key=lambda x: x['file'].lower())

# Add system to mapping if it has ROMs
if rom_count > 0:
mapping[system_name] = {
Expand Down

0 comments on commit 1128590

Please sign in to comment.