diff --git a/scripts/package-release.ps1 b/scripts/package-release.ps1 index 192db6a..b7551e1 100644 --- a/scripts/package-release.ps1 +++ b/scripts/package-release.ps1 @@ -44,8 +44,9 @@ $meta = [ordered]@{ framework = "net9.0" timestamp = $timestamp } +$utf8NoBom = New-Object System.Text.UTF8Encoding $false $metaJson = $meta | ConvertTo-Json -Depth 5 -[System.IO.File]::WriteAllText((Join-Path $stageDir "meta.json"), $metaJson) +[System.IO.File]::WriteAllText((Join-Path $stageDir "meta.json"), $metaJson, $utf8NoBom) Copy-Item $dllPath -Destination (Join-Path $stageDir "Jellyfin.Plugin.Request.dll") $tempZip = Join-Path $releaseDir ("tmp_" + [guid]::NewGuid().ToString("N") + ".zip") @@ -81,10 +82,10 @@ $plugin = [ordered]@{ versions = @($versionObj) } -# Jellyfin requires a JSON array root. +# Jellyfin requires a JSON array root and no UTF-8 BOM. $pluginJson = ($plugin | ConvertTo-Json -Depth 8) $manifestJson = "[" + [Environment]::NewLine + $pluginJson + [Environment]::NewLine + "]" -[System.IO.File]::WriteAllText($manifestPath, $manifestJson) +[System.IO.File]::WriteAllText($manifestPath, $manifestJson, $utf8NoBom) Write-Host "Packaged: $zipPath" Write-Host "Checksum: $checksum"