Skip to content

Commit 744d92d

Browse files
committed
lower fs name
1 parent 122cdf0 commit 744d92d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

backend/handler/filesystem/roms_handler.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
)
6161
)
6262

63+
# PICO-8 cartridges are often stored as PNG files
64+
PICO8_CARTRIDGE_EXTENSION = ".p8.png"
65+
66+
6367
# CHD (Compressed Hunks of Data) v5 format constants
6468
# See: https://github.com/mamedev/mame/blob/master/src/lib/util/chd.h
6569
CHD_SIGNATURE: Final = b"MComprHD"
@@ -105,8 +109,6 @@
105109

106110
FILE_READ_CHUNK_SIZE = 1024 * 8
107111

108-
PICO8_CARTRIDGE_EXTENSION = ".p8.png"
109-
110112

111113
class FSRom(TypedDict):
112114
fs_name: str
@@ -740,7 +742,9 @@ def get_pico8_cover_url(
740742
the cartridge label/cover art. When such a ROM is found we can use the
741743
file itself as the cover instead of fetching one from an external source.
742744
"""
743-
if platform_slug == UPS.PICO and fs_name.endswith(PICO8_CARTRIDGE_EXTENSION):
745+
if platform_slug == UPS.PICO and fs_name.lower().endswith(
746+
PICO8_CARTRIDGE_EXTENSION
747+
):
744748
rom_path = self.validate_path(f"{fs_path}/{fs_name}")
745749
return f"file://{rom_path}"
746750
return None

0 commit comments

Comments
 (0)