diff --git a/samy.ps1 b/samy.ps1 index 729786e..32ef4b3 100644 --- a/samy.ps1 +++ b/samy.ps1 @@ -978,10 +978,13 @@ function Get-UIHtml { function Get-SamyTasks { [CmdletBinding()] - param() + param( + [Parameter(Mandatory = $true)] + [string]$Url + ) try { - $json = Get-RemoteText -Url $Script:SamyTasksUrl + $json = Get-RemoteText -Url $Url if ([string]::IsNullOrWhiteSpace($json)) { throw "Tasks JSON was empty." } @@ -995,12 +998,13 @@ function Get-SamyTasks { return $tasks } catch { - Write-LogHybrid "Failed to load samy.tasks.json: $($_.Exception.Message). Falling back to embedded tasks." Warning UI -LogToEvent + Write-LogHybrid "Failed to load tasks from ${Url}: $($_.Exception.Message)" Warning UI -LogToEvent return $null } } + #endregion UIHtml