mirror of
https://github.com/JDM170/ReVanced_Builder
synced 2025-11-29 14:41:46 +07:00
Update YouTube.ps1
Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# Get the latest supported YouTube version to patch
|
||||
# https://api.revanced.app/docs/swagger
|
||||
$Parameters = @{
|
||||
Uri = "https://api.revanced.app/v2/patches/latest"
|
||||
Uri = "https://api.revanced.app/v4/patches/list"
|
||||
UseBasicParsing = $true
|
||||
}
|
||||
$JSON = (Invoke-RestMethod @Parameters).patches
|
||||
$versions = ($JSON | Where-Object -FilterScript {$_.compatiblePackages.name -eq "com.google.android.youtube"}).compatiblePackages.versions
|
||||
$LatestSupported = $versions | Sort-Object -Descending -Unique | Select-Object -First 1
|
||||
$JSON = (Invoke-Webrequest @Parameters).Content | ConvertFrom-Json
|
||||
$versions = ($JSON | Where-Object -FilterScript {$_.name -eq "Video ads"})
|
||||
$LatestSupported = $versions.compatiblePackages.'com.google.android.youtube' | Sort-Object -Descending -Unique | Select-Object -First 1
|
||||
|
||||
# We need a NON-bundle version
|
||||
# https://apkpure.net/ru/youtube/com.google.android.youtube/versions
|
||||
|
||||
Reference in New Issue
Block a user