mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-02 10:48:29 +02:00
22 lines
557 B
Python
22 lines
557 B
Python
import enum
|
|
|
|
|
|
class Extension(enum.Enum):
|
|
"""
|
|
Enum for game extension
|
|
"""
|
|
WBFS = ".wbfs"
|
|
FST = ".dol"
|
|
CISO = ".ciso"
|
|
ISO = ".iso"
|
|
|
|
@classmethod
|
|
def _missing_(cls, value: str) -> "Extension | None":
|
|
"""
|
|
if not found, search for the same value with lower case
|
|
:param value: value to search for
|
|
:return: None if nothing found, otherwise the found value
|
|
"""
|
|
value = value.lower()
|
|
for member in filter(lambda m: m.value == value, cls): return member
|
|
return None
|