Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Commit

Permalink
Try this instead..
Browse files Browse the repository at this point in the history
  • Loading branch information
JourneyOver committed Jan 31, 2024
1 parent 6b13298 commit eb37a1d
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions automatic/tinymediamanager/update.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Import-Module au
Import-Module "$PSScriptRoot\..\..\scripts\au_extensions.psm1"

$releasev3 = 'https://release.tinymediamanager.org/download_v3.html'
#$releasev3 = 'https://release.tinymediamanager.org/download_v3.html'
$releasev4 = 'https://release.tinymediamanager.org/download_v4.html'
$releasev5 = 'https://release.tinymediamanager.org/download_v5.html'

Expand Down Expand Up @@ -74,29 +74,29 @@ function GetV4Version() {
}
}

function GetV3Version() {
$download_page = Invoke-WebRequest -Uri $releasev3 -UseBasicParsing

#tmm_3.1.17_win.zip
$re = "tmm_3.+_*_win.zip$"
$url = $download_page.links | Where-Object href -Match $re | Select-Object -Last 1 -expand href

$version = $url -split 'tmm_|_.*?.zip' | Select-Object -Last 1 -Skip 1
$url32 = 'https://release.tinymediamanager.org/' + $url

@{
Version = $version
URL32 = $url32
}
}
#function GetV3Version() {
# $download_page = Invoke-WebRequest -Uri $release -UseBasicParsing
#
# #Version v3.1.18
# $versionRegEx = 'Version\s+v3.+'
# $version = ([regex]::match($download_page.Content, $versionRegEx) -replace ("Version v", ""))
#
# #https://archive.tinymediamanager.org/v3.1.18/tmm_3.1.18_win.zip
# $url32 = "https://archive.tinymediamanager.org/v$version/tmm_$version" + "_win.zip"
#
# @{
# Version = $version
# URL32 = $url32
# }
#}

function global:au_GetLatest {
$v3Stream = GetV3Version
# $v3Stream = GetV3Version
$v4Stream = GetV4Version
$v5Stream = GetV5Version

$streams = [ordered] @{
v3 = $v3Stream
# v3 = $v3Stream
v4 = $v4Stream
v5 = $v5Stream
}
Expand Down

0 comments on commit eb37a1d

Please sign in to comment.