From 52d843361b719a300a7bc0c9b8381c544ce6217a Mon Sep 17 00:00:00 2001 From: Aaron Parker Date: Fri, 13 Dec 2024 08:33:05 +1100 Subject: [PATCH] Update Paint.NET manifest and script to use new API endpoint and structure #783 --- Evergreen/Apps/Get-PaintDotNet.ps1 | 13 +++++-------- Evergreen/Manifests/PaintDotNet.json | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Evergreen/Apps/Get-PaintDotNet.ps1 b/Evergreen/Apps/Get-PaintDotNet.ps1 index d20c9630..f6ce7e1e 100644 --- a/Evergreen/Apps/Get-PaintDotNet.ps1 +++ b/Evergreen/Apps/Get-PaintDotNet.ps1 @@ -17,18 +17,15 @@ function Get-PaintDotNet { ) # Read the Paint.NET updates feed - $Content = Invoke-EvergreenWebRequest -Uri $res.Get.Uri + $Content = Invoke-EvergreenRestMethod -Uri $res.Get.Uri if ($null -ne $Content) { - # Convert the content from string data - $Data = $Content | ConvertFrom-StringData - $Key = $Data.Keys | Where-Object { $_ -match $res.Get.UrlProperty } - # Build the output object - foreach ($url in $Data.$Key) { + foreach ($File in $Content.releases.files) { $PSObject = [PSCustomObject] @{ - Version = $Data.($res.Get.VersionProperty) - URI = $url + Version = $Content.releases.version + Architecture = Get-Architecture -String $File.architecture + URI = $File.'mirror-urls'[0] } Write-Output -InputObject $PSObject } diff --git a/Evergreen/Manifests/PaintDotNet.json b/Evergreen/Manifests/PaintDotNet.json index df674fcb..21c1bfca 100644 --- a/Evergreen/Manifests/PaintDotNet.json +++ b/Evergreen/Manifests/PaintDotNet.json @@ -2,7 +2,7 @@ "Name": "dotPDN LLC Paint.NET", "Source": "https://getpaint.net", "Get": { - "Uri": "https://www.getpaint.net/updates/versions.8.1000.0.x64.en.txt", + "Uri": "https://getpaint.net/updates/v9/manifest.os1000.x64.json", "VersionProperty": "StableVersions", "UrlProperty": "_ZipUrlList", "UrlDelimiter": ","