version bump to 1.2.78.418

- Improve language code formatting logic
This commit is contained in:
amd64fox
2025-12-04 10:23:31 +03:00
parent fcd40cbc48
commit 9cf696b876
+15 -6
View File
@@ -270,18 +270,27 @@ function Format-LanguageCode {
break break
} }
} }
# Checking the long language code # Checking the long language code
if ($long_code -and $returnCode -NotIn $supportLanguages) { if ($long_code -and $returnCode -NotIn $supportLanguages) {
$returnCode = $returnCode -split "-" | Select-Object -First 1 if ($returnCode -match '-') {
$intermediateCode = $returnCode.Substring(0, $returnCode.LastIndexOf('-'))
if ($intermediateCode -in $supportLanguages) {
$returnCode = $intermediateCode
}
else {
$returnCode = $returnCode -split "-" | Select-Object -First 1
}
}
} }
# Checking the short language code
if ($returnCode -NotIn $supportLanguages) { if ($returnCode -NotIn $supportLanguages) {
# If the language code is not supported default to English.
$returnCode = 'en' $returnCode = 'en'
} }
return $returnCode return $returnCode
} }
$spotifyDirectory = Join-Path $env:APPDATA 'Spotify' $spotifyDirectory = Join-Path $env:APPDATA 'Spotify'
$spotifyDirectory2 = Join-Path $env:LOCALAPPDATA 'Spotify' $spotifyDirectory2 = Join-Path $env:LOCALAPPDATA 'Spotify'
@@ -402,7 +411,7 @@ if (!($version -and $version -match $match_v)) {
} }
else { else {
# latest tested version for Win 10-12 # latest tested version for Win 10-12
$onlineFull = "1.2.78.409.g6aead1f8-948" $onlineFull = "1.2.78.418.gaeeb5ebd-1067"
} }
} }
else { else {