feat(repo): add request plugin with jellyfin catalog manifest
Ship the plugin sources, release zip, and SeerrFin-style manifest.json so Jellyfin can install from the Gitea raw repository URL. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
3a1960d860
commit
bf6cd4540f
30 files changed
+3096
No files matched your search
@@ -0,0 +1,93 @@
|
||||
param(
|
||||
[string]$Version = "1.0.0.0",
|
||||
[string]$TargetAbi = "10.11.0.0",
|
||||
[string]$RepoRawBase = "https://git.masengr.com/Michael-A-Sloan/Jellyfin_Request_tvandmovies/raw/branch/main"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
Set-Location $root
|
||||
|
||||
$guid = "11c08950-c4bb-484d-89ff-205b3724416b"
|
||||
$pluginName = "Request"
|
||||
$zipFileName = "Jellyfin.Plugin.Request_10.11.0.zip"
|
||||
$releaseDir = Join-Path $root "release"
|
||||
$stageDir = Join-Path $releaseDir "stage"
|
||||
$dllPath = Join-Path $root "Jellyfin.Plugin.Request\bin\Release\net9.0\Jellyfin.Plugin.Request.dll"
|
||||
$zipPath = Join-Path $releaseDir $zipFileName
|
||||
$manifestPath = Join-Path $root "manifest.json"
|
||||
$timestamp = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ")
|
||||
$changelog = "Initial release: local request queue, TMDB search, Request nav tab"
|
||||
|
||||
Write-Host "Building plugin..."
|
||||
dotnet build (Join-Path $root "Jellyfin.Plugin.Request.sln") -c Release
|
||||
if (-not (Test-Path $dllPath)) {
|
||||
throw "DLL not found at $dllPath"
|
||||
}
|
||||
|
||||
New-Item -ItemType Directory -Force -Path $releaseDir | Out-Null
|
||||
if (Test-Path $stageDir) {
|
||||
Remove-Item $stageDir -Recurse -Force
|
||||
}
|
||||
New-Item -ItemType Directory -Force -Path $stageDir | Out-Null
|
||||
|
||||
$meta = [ordered]@{
|
||||
guid = $guid
|
||||
name = $pluginName
|
||||
description = "Adds a Request tab to Jellyfin Web so users can search TMDB and submit movie and TV requests into a local queue for administrators to review."
|
||||
overview = "Request movies and TV shows from a local admin review queue"
|
||||
owner = "Michael-A-Sloan"
|
||||
category = "General"
|
||||
version = $Version
|
||||
changelog = $changelog
|
||||
targetAbi = $TargetAbi
|
||||
framework = "net9.0"
|
||||
timestamp = $timestamp
|
||||
}
|
||||
$metaJson = $meta | ConvertTo-Json -Depth 5
|
||||
[System.IO.File]::WriteAllText((Join-Path $stageDir "meta.json"), $metaJson)
|
||||
Copy-Item $dllPath -Destination (Join-Path $stageDir "Jellyfin.Plugin.Request.dll")
|
||||
|
||||
$tempZip = Join-Path $releaseDir ("tmp_" + [guid]::NewGuid().ToString("N") + ".zip")
|
||||
Compress-Archive -Path (Join-Path $stageDir "*") -DestinationPath $tempZip -Force
|
||||
Remove-Item $stageDir -Recurse -Force
|
||||
|
||||
if (Test-Path $zipPath) {
|
||||
Remove-Item $zipPath -Force -ErrorAction SilentlyContinue
|
||||
Start-Sleep -Milliseconds 200
|
||||
}
|
||||
Move-Item -Path $tempZip -Destination $zipPath -Force
|
||||
|
||||
$checksum = (Get-FileHash -Path $zipPath -Algorithm MD5).Hash.ToUpperInvariant()
|
||||
$sourceUrl = "$RepoRawBase/release/$zipFileName"
|
||||
|
||||
$versionObj = [ordered]@{
|
||||
version = $Version
|
||||
changelog = $changelog
|
||||
targetAbi = $TargetAbi
|
||||
sourceUrl = $sourceUrl
|
||||
checksum = $checksum
|
||||
timestamp = $timestamp
|
||||
dependencies = @()
|
||||
}
|
||||
$plugin = [ordered]@{
|
||||
guid = $guid
|
||||
name = $pluginName
|
||||
description = "Adds a Request tab to Jellyfin Web so users can search TMDB and submit movie and TV requests into a local queue for administrators to review."
|
||||
overview = "Request movies and TV shows from a local admin review queue"
|
||||
owner = "Michael-A-Sloan"
|
||||
category = "General"
|
||||
repositoryUrl = "https://git.masengr.com/Michael-A-Sloan/Jellyfin_Request_tvandmovies"
|
||||
versions = @($versionObj)
|
||||
}
|
||||
|
||||
# Jellyfin requires a JSON array root.
|
||||
$pluginJson = ($plugin | ConvertTo-Json -Depth 8)
|
||||
$manifestJson = "[" + [Environment]::NewLine + $pluginJson + [Environment]::NewLine + "]"
|
||||
[System.IO.File]::WriteAllText($manifestPath, $manifestJson)
|
||||
|
||||
Write-Host "Packaged: $zipPath"
|
||||
Write-Host "Checksum: $checksum"
|
||||
Write-Host "Manifest: $manifestPath"
|
||||
Write-Host "Jellyfin repository URL:"
|
||||
Write-Host " $RepoRawBase/manifest.json"
|
||||
Reference in new issue
Block a user