Update mido.sh

This commit is contained in:
Kroese 2024-11-15 01:13:02 +01:00 committed by GitHub
parent cea531cf3a
commit a571ab69cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -57,38 +57,6 @@ get_agent() {
return 0 return 0
} }
convert_language() {
local lang=""
case "${1,,}" in
"gb" | "en-gb" )
lang="English International" ;;
"en" | "en-"* )
lang="English" ;;
"mx" | "es-mx" )
lang="Spanish (Mexico)" ;;
"ca" | "fr-ca" )
lang="French Canadian" ;;
"br" | "pt-br" )
lang="Brazilian Portuguese" ;;
"sr" | "sr-"* )
lang="Serbian Latin" ;;
"hk" | "zh-hk" | "cn-hk" )
lang="Chinese (Traditional)" ;;
"tw" | "zh-tw" | "cn-tw" )
lang="Chinese (Traditional)" ;;
"zh" | "zh-"* | "cn" | "cn-"* )
lang="Chinese (Simplified)" ;;
* )
lang=$(getLanguage "$1" "name") ;;
esac
echo "$lang"
return 0
}
download_windows() { download_windows() {
local id="$1" local id="$1"
@ -110,8 +78,7 @@ download_windows() {
local profile="606624d44113" local profile="606624d44113"
user_agent=$(get_agent) user_agent=$(get_agent)
language=$(convert_language "$lang") language=$(getLanguage "$lang" "name")
[ -z "$language" ] && error "Invalid language: $lang" && return 1
case "${id,,}" in case "${id,,}" in
"win11x64" ) windows_version="11" && download_type="1" ;; "win11x64" ) windows_version="11" && download_type="1" ;;