From a54d741c926cdbd556ccb889b4fbfd491ec079a0 Mon Sep 17 00:00:00 2001 From: Sergio Date: Wed, 20 Nov 2024 17:57:17 +0100 Subject: [PATCH] Afegides mes extensions per a fitxers a descomprimir --- __pycache__/config.cpython-312.pyc | Bin 714 -> 0 bytes zxdb.py | 12 +++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) delete mode 100644 __pycache__/config.cpython-312.pyc diff --git a/__pycache__/config.cpython-312.pyc b/__pycache__/config.cpython-312.pyc deleted file mode 100644 index 91c6b996d026f183b575ca78a92eb827fdaae613..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 714 zcmZva&2HL25XaZxfH8)GQVxv0FP7rZ?;zQL32xGrswDuhHCZ>^Ani-vUB0JG-I1Syepuhpsqr#{o&H|W{Wt|uud7&zXWiP-qI!n-{HjWE2wro|GY}L@Az*b_uCAAd1Q(6@xYt9-Q^YZ z{n2M{(73#P%f^5W>f%yE~fp(ul&zm7C zM7iC7kAzo229)jBA*w|$--M_hm8&7zj4HJdm7;1rL=}j0Lcm5@A>bAcgwoazR2*+X Fw?EB+(SHB{ diff --git a/zxdb.py b/zxdb.py index d74afcc..39bfe86 100644 --- a/zxdb.py +++ b/zxdb.py @@ -280,7 +280,7 @@ def unzip_file(src, dst): dst (str): Ruta del directorio donde se extraerán los ficheros. Extensiones soportadas: - .z80, .sna, .tzx, .tap, .dsk, .trd + .tap, .tzx, .stl, .sna, .z80, .dsk, .fdi, .trd, .img, .mgt, .szx, .dck Comportamiento: - Abre el archivo ZIP especificado por `src`. @@ -297,8 +297,14 @@ def unzip_file(src, dst): """ archive = src directory = dst - extensions = (".z80", ".sna", ".tzx", ".tap", ".dsk", ".trd") - + tape_file_formats = (".tap", ".tzx") + snapshot_file_formats = (".stl", ".sna", ".z80") + disk_file_formats = (".dsk", ".fdi", ".trd", ".img", ".mgt") + emulator_specific_formats = (".szx", ".dck") + + # Sumar todas las listas anteriores + extensions = tape_file_formats + snapshot_file_formats + disk_file_formats + emulator_specific_formats + try: with zipfile.ZipFile(archive, "r") as zip_file: for file in zip_file.namelist():