fix to check the recommended version

This commit is contained in:
amd64fox
2022-11-29 00:37:57 +03:00
parent 0ace6b5fbf
commit 0f1348f358
2 changed files with 3 additions and 7 deletions
+2 -6
View File
@@ -509,12 +509,8 @@ function DesktopFolder {
return $desktop_folder
}
# Checking the recommended version for spotx
$ProgressPreference = 'SilentlyContinue' # Hiding Progress Bars
$readme = Invoke-WebRequest -UseBasicParsing -Uri https://raw.githubusercontent.com/SpotX-CLI/SpotX-Win/main/README.md
$match = $readme.RawContent | Select-String "Recommended official version \[\d+\.\d+\.\d+\.\d+\]" -AllMatches
$ver = $match.Matches.Value
$online = $ver -replace 'Recommended official version \[(\d+\.\d+\.\d+\.\d+)\]', '$1'
# Recommended version for spotx
$online = "1.1.99.878"
# Check version Spotify offline
$offline = (Get-Item $spotifyExecutable).VersionInfo.FileVersion