From 58837960b82f14e3cc6589d100393395ffa06d68 Mon Sep 17 00:00:00 2001 From: James Ruskin Date: Wed, 3 Jul 2024 14:31:32 +0100 Subject: [PATCH] (quiterss) Fixes Update.ps1 The format of the downloads page (and what looks like the entire website) has changed quite considerably, to a hosted files/folders layout. This change is now accounted for. --- automatic/quiterss/update.ps1 | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/automatic/quiterss/update.ps1 b/automatic/quiterss/update.ps1 index 3cc47eaa350..aa2bce4b636 100644 --- a/automatic/quiterss/update.ps1 +++ b/automatic/quiterss/update.ps1 @@ -1,14 +1,18 @@ Import-Module Chocolatey-AU -$releases = 'https://quiterss.org/en/download' +$releases = 'https://quiterss.org/files/' function global:au_GetLatest { - $download_page = Invoke-WebRequest -Uri $releases -UseBasicParsing - $url = $download_page.links | ? href -match '.exe$' | select -First 1 -expand href - $version = $url -split '-' | select -First 1 -Skip 1 + $releases_page = Invoke-WebRequest -Uri $releases -UseBasicParsing + $available_versions = $releases_page.links | Where-Object {$_.title -and $_.title.TrimEnd('_') -as [version]} | Sort-Object {$_.title.TrimEnd('_') -as [version]} + $latest_version_url = $releases.TrimEnd('/') + '/' + $available_versions[-1].href + + $download_page = Invoke-WebRequest -Uri $latest_version_url -UseBasicParsing + $url = $download_page.links | ? href -match '\.exe$' | Select-Object -First 1 -expand href + $version = $url -split '-' | Select-Object -First 1 -Skip 1 @{ - URL32 = 'https://quiterss.org' + $url + URL32 = $latest_version_url + $url Version = $version } }