summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gamechestcli/gamechest/runners/extract.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/gamechestcli/gamechest/runners/extract.py b/gamechestcli/gamechest/runners/extract.py
index 12f4d2f..1715bd6 100644
--- a/gamechestcli/gamechest/runners/extract.py
+++ b/gamechestcli/gamechest/runners/extract.py
@@ -33,14 +33,14 @@ class Extract(RunnerBase):
)
lzip_command = '/usr/bin/lzip'
plzip_command = '/usr/bin/plzip'
- lzip_command_to_use = lzip_command
- if os.path.exists(plzip_command):
- lzip_command_to_use = plzip_command
+ uncompress_command_to_use = [lzip_command, '--decompress']
+ if src.endswith('.tlz'):
+ if os.path.exists(plzip_command):
+ uncompress_command_to_use = [plzip_command, '--decompress']
+ elif src.endswith('.tzst'):
+ uncompress_command_to_use = ['zstd', '-T0', '-d', '--stdout']
self.zip_proc = subprocess.Popen(
- [
- lzip_command_to_use,
- '--decompress',
- ],
+ uncompress_command_to_use,
stdin=self.pv_proc.stdout,
stdout=subprocess.PIPE,
**common_parameters,