mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-28 16:45:42 +00:00
FEATURES: migrated zip_compressable_extensions
This commit is contained in:
parent
2bbc6c4cf4
commit
144da6d7a7
|
@ -195,6 +195,71 @@
|
|||
"tg16"
|
||||
]
|
||||
},
|
||||
"zip_compressable_extensions": [
|
||||
".32x",
|
||||
".68k",
|
||||
".NDS",
|
||||
".a26",
|
||||
".a52",
|
||||
".a78",
|
||||
".abs",
|
||||
".agb",
|
||||
".atr",
|
||||
".atx",
|
||||
".bin",
|
||||
".bml",
|
||||
".bms",
|
||||
".bs",
|
||||
".bsx",
|
||||
".cas",
|
||||
".cdm",
|
||||
".cgb",
|
||||
".cof",
|
||||
".col",
|
||||
".dim",
|
||||
".dmg",
|
||||
".dx2",
|
||||
".fds",
|
||||
".fig",
|
||||
".gb",
|
||||
".gba",
|
||||
".gbc",
|
||||
".gd3",
|
||||
".gd7",
|
||||
".gen",
|
||||
".gg",
|
||||
".ipf",
|
||||
".j64",
|
||||
".jag",
|
||||
".lnx",
|
||||
".md",
|
||||
".mdx",
|
||||
".mgd",
|
||||
".msa",
|
||||
".nds",
|
||||
".nes",
|
||||
".ngc",
|
||||
".o",
|
||||
".pce",
|
||||
".prg",
|
||||
".rom",
|
||||
".sfc",
|
||||
".sg",
|
||||
".sgb",
|
||||
".sgd",
|
||||
".smc",
|
||||
".smd",
|
||||
".sms",
|
||||
".st",
|
||||
".st",
|
||||
".stx",
|
||||
".swc",
|
||||
".unf",
|
||||
".unif",
|
||||
".xex",
|
||||
".xfd",
|
||||
".z64"
|
||||
],
|
||||
"system": {
|
||||
"3do": {
|
||||
"name": "3DO Interactive Multiplayer"
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
.32x
|
||||
.68k
|
||||
.NDS
|
||||
.a26
|
||||
.a52
|
||||
.a78
|
||||
.abs
|
||||
.agb
|
||||
.atr
|
||||
.atx
|
||||
.bin
|
||||
.bml
|
||||
.bms
|
||||
.bs
|
||||
.bsx
|
||||
.cas
|
||||
.cdm
|
||||
.cgb
|
||||
.cof
|
||||
.col
|
||||
.dim
|
||||
.dmg
|
||||
.dx2
|
||||
.fds
|
||||
.fig
|
||||
.gb
|
||||
.gba
|
||||
.gbc
|
||||
.gd3
|
||||
.gd7
|
||||
.gen
|
||||
.gg
|
||||
.ipf
|
||||
.j64
|
||||
.jag
|
||||
.lnx
|
||||
.md
|
||||
.mdx
|
||||
.mgd
|
||||
.msa
|
||||
.nds
|
||||
.nes
|
||||
.ngc
|
||||
.o
|
||||
.pce
|
||||
.prg
|
||||
.rom
|
||||
.sfc
|
||||
.sg
|
||||
.sgb
|
||||
.sgd
|
||||
.smc
|
||||
.smd
|
||||
.sms
|
||||
.st
|
||||
.st
|
||||
.stx
|
||||
.swc
|
||||
.unf
|
||||
.unif
|
||||
.xex
|
||||
.xfd
|
||||
.z64
|
|
@ -56,13 +56,15 @@ find_compatible_compression_format() {
|
|||
local normalized_filename=$(echo "$1" | tr '[:upper:]' '[:lower:]')
|
||||
local system=$(echo "$1" | grep -oE "$roms_folder/[^/]+" | grep -oE "[^/]+$")
|
||||
|
||||
# Extract the relevant lists from the JSON file
|
||||
local chd_systems=$(jq -r '.compression_targets.chd[]' $features)
|
||||
local rvz_systems=$(jq -r '.compression_targets.rvz[]' $features)
|
||||
local zip_systems=$(jq -r '.compression_targets.zip[]' $features)
|
||||
local zip_compressable_extensions=$(jq -r '.zip_compressable_extensions[]' $features)
|
||||
|
||||
if [[ $(validate_for_chd "$1") == "true" ]] && echo "$chd_systems" | grep -q "\b$system\b"; then
|
||||
echo "chd"
|
||||
elif grep -qF ".${normalized_filename##*.}" $zip_compressable_extensions && echo "$zip_systems" | grep -q "\b$system\b"; then
|
||||
elif echo "$zip_compressable_extensions" | grep -qF ".${normalized_filename##*.}" && echo "$zip_systems" | grep -q "\b$system\b"; then
|
||||
echo "zip"
|
||||
elif echo "$normalized_filename" | grep -qE '\.iso|\.gcm' && echo "$rvz_systems" | grep -q "\b$system\b"; then
|
||||
echo "rvz"
|
||||
|
@ -74,6 +76,7 @@ find_compatible_compression_format() {
|
|||
fi
|
||||
}
|
||||
|
||||
|
||||
validate_for_chd() {
|
||||
# Function for validating chd compression candidates, and compresses if validation passes. Supports .cue, .iso and .gdi formats ONLY
|
||||
# USAGE: validate_for_chd $input_file
|
||||
|
|
|
@ -27,7 +27,6 @@ config="/app/retrodeck/config"
|
|||
rd_defaults="$config/retrodeck/retrodeck.cfg" # A default RetroDECK config file
|
||||
rd_update_patch="/var/config/retrodeck/rd_update.patch" # A static location for the temporary patch file used during retrodeck.cfg updates
|
||||
bios_checklist="$config/retrodeck/reference_lists/bios_checklist.cfg" # A config file listing BIOS file information that can be verified
|
||||
zip_compressable_extensions="$config/retrodeck/reference_lists/zip_compressable_extensions.cfg" # A config file containing every file extension that is allowed to be compressed to .zip format, because there are a lot!
|
||||
input_validation="$config/retrodeck/reference_lists/input_validation.cfg" # A config file listing valid CLI inputs
|
||||
finit_options_list="$config/retrodeck/reference_lists/finit_options_list.cfg" # A config file listing available optional installs during finit
|
||||
splashscreen_dir="/var/config/ES-DE/resources/graphics/extra_splashes" # The default location of extra splash screens
|
||||
|
|
Loading…
Reference in a new issue