Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28b6244a17
|
+21
-12
@@ -69,24 +69,15 @@ jobs:
|
|||||||
jprm plugin build . --output artifacts --version "${{ steps.version.outputs.version }}"
|
jprm plugin build . --output artifacts --version "${{ steps.version.outputs.version }}"
|
||||||
ls -l artifacts
|
ls -l artifacts
|
||||||
|
|
||||||
# The repository manifest travels with the releases: take the one from the
|
# manifest.json in the source tree is the plugin repository users install from.
|
||||||
# latest release, add this version, and publish it again as an asset.
|
# Add this version to it; it is committed back once the release exists.
|
||||||
- name: Update repository manifest
|
- name: Update repository manifest
|
||||||
if: steps.version.outputs.release == 'true'
|
if: steps.version.outputs.release == 'true'
|
||||||
env:
|
env:
|
||||||
TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
TAG: ${{ steps.version.outputs.tag }}
|
TAG: ${{ steps.version.outputs.tag }}
|
||||||
run: |
|
run: |
|
||||||
api="$GITHUB_API_URL/repos/$GITHUB_REPOSITORY"
|
|
||||||
mkdir -p repo
|
mkdir -p repo
|
||||||
previous="$(curl -fsS -H "Authorization: token $TOKEN" "$api/releases/latest" 2>/dev/null \
|
cp manifest.json repo/manifest.json
|
||||||
| python3 -c 'import json,sys; print(next((a["browser_download_url"] for a in json.load(sys.stdin).get("assets", []) if a["name"] == "manifest.json"), ""))' 2>/dev/null || true)"
|
|
||||||
if [ -n "$previous" ] && curl -fsSL -H "Authorization: token $TOKEN" -o repo/manifest.json "$previous"; then
|
|
||||||
echo "Continuing the manifest of the latest release"
|
|
||||||
else
|
|
||||||
rm -f repo/manifest.json
|
|
||||||
jprm repo init repo
|
|
||||||
fi
|
|
||||||
|
|
||||||
zip="$(ls artifacts/*.zip)"
|
zip="$(ls artifacts/*.zip)"
|
||||||
jprm repo add \
|
jprm repo add \
|
||||||
@@ -123,3 +114,21 @@ jobs:
|
|||||||
-F "attachment=@$file" "$api/releases/$id/assets?name=$(basename "$file")" > /dev/null
|
-F "attachment=@$file" "$api/releases/$id/assets?name=$(basename "$file")" > /dev/null
|
||||||
echo "Attached $(basename "$file")"
|
echo "Attached $(basename "$file")"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
- name: Commit repository manifest
|
||||||
|
if: steps.version.outputs.release == 'true'
|
||||||
|
env:
|
||||||
|
TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
TAG: ${{ steps.version.outputs.tag }}
|
||||||
|
run: |
|
||||||
|
cp artifacts/manifest.json manifest.json
|
||||||
|
if git diff --quiet -- manifest.json; then
|
||||||
|
echo "manifest.json is already up to date"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
git config user.name "$GITHUB_ACTOR"
|
||||||
|
git config user.email "$GITHUB_ACTOR@noreply.${GITHUB_SERVER_URL#*://}"
|
||||||
|
git add manifest.json
|
||||||
|
git commit -m "chore: add $TAG to the plugin manifest [skip ci]"
|
||||||
|
git push "${GITHUB_SERVER_URL%%://*}://x-access-token:$TOKEN@${GITHUB_SERVER_URL#*://}/$GITHUB_REPOSITORY.git" HEAD:main
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ One line per decision, with the reason.
|
|||||||
- Target Jellyfin **10.11.11** (`Jellyfin.Controller` / `Jellyfin.Model` 10.11.11, `net9.0`): it is the last 10.11 release on NuGet; the nuspec of that package lists `net9.0` as its only framework. Versions live in `Directory.Build.props`.
|
- Target Jellyfin **10.11.11** (`Jellyfin.Controller` / `Jellyfin.Model` 10.11.11, `net9.0`): it is the last 10.11 release on NuGet; the nuspec of that package lists `net9.0` as its only framework. Versions live in `Directory.Build.props`.
|
||||||
- `targetAbi` is `10.11.0.0`: the plugin only uses APIs that exist across 10.11, so it should not be pinned to the patch release it was compiled against.
|
- `targetAbi` is `10.11.0.0`: the plugin only uses APIs that exist across 10.11, so it should not be pinned to the patch release it was compiled against.
|
||||||
- Removed the template's `.github` workflows and Renovate preset: they call reusable workflows and secrets of the Jellyfin organisation and cannot run elsewhere. Replaced by one self-contained workflow for Gitea Actions in `.gitea/workflows`; it talks to the Gitea API with `curl`, so it needs no forge-specific CLI on the runner.
|
- Removed the template's `.github` workflows and Renovate preset: they call reusable workflows and secrets of the Jellyfin organisation and cannot run elsewhere. Replaced by one self-contained workflow for Gitea Actions in `.gitea/workflows`; it talks to the Gitea API with `curl`, so it needs no forge-specific CLI on the runner.
|
||||||
- Releases are driven by the version, not by hand-made tags: a push to `main` whose `build.yaml` version has no `v<version>` tag is tagged and released by the workflow. The plugin repository manifest is a release asset carried forward from release to release, so nothing has to be committed back by CI.
|
- Releases are driven by the version, not by hand-made tags: a push to `main` whose `build.yaml` version has no `v<version>` tag is tagged and released by the workflow. The plugin repository is `manifest.json` in the source tree, installed through its raw link on `main`; the workflow adds each release to it and commits the file back (`[skip ci]`), so the install URL does not depend on a release asset.
|
||||||
- Removed the template's `.vscode` folder: it assumes a local checkout of the Jellyfin server and web client next to the repo.
|
- Removed the template's `.vscode` folder: it assumes a local checkout of the Jellyfin server and web client next to the repo.
|
||||||
- No analyzer warnings are suppressed project-wide. The only suppressions are three `CA2100` pragmas in `Storage/` where a command text is assigned from a constant string, which the analyzer cannot see through a helper.
|
- No analyzer warnings are suppressed project-wide. The only suppressions are three `CA2100` pragmas in `Storage/` where a command text is assigned from a constant string, which the analyzer cannot see through a helper.
|
||||||
- The test project does not reference the StyleCop/`AllEnabledByDefault` analyzer set: XML docs and naming rules on test methods add noise without value. It still builds with warnings as errors.
|
- The test project does not reference the StyleCop/`AllEnabledByDefault` analyzer set: XML docs and naming rules on test methods add noise without value. It still builds with warnings as errors.
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ Watch-time stats are collected on the server and cover all clients.
|
|||||||
|
|
||||||
### From a plugin repository
|
### From a plugin repository
|
||||||
|
|
||||||
1. In Jellyfin: **Dashboard → Plugins → Manage Repositories → New Repository**, enter `https://github.com/JoshiCodes/jellyfin-Herald/releases/latest/download/manifest.json`.
|
1. In Jellyfin: **Dashboard → Plugins → Manage Repositories → New Repository**, enter `https://git.joshicodes.de/JoshiCodes/jellyfin-herald/raw/branch/main/manifest.json`.
|
||||||
2. Install **Herald** from the catalogue and restart the server.
|
2. Install **Herald** from the catalogue and restart the server.
|
||||||
|
|
||||||
### Manually
|
### Manually
|
||||||
@@ -183,11 +183,11 @@ This writes `artifacts/herald_<version>.zip`. The Jellyfin version, target frame
|
|||||||
|
|
||||||
The version lives in `build.yaml` (`version`) and `Directory.Build.props` (`Version`, `AssemblyVersion`, `FileVersion`); keep them equal, the workflow fails otherwise. Put the release notes in `changelog` in `build.yaml`.
|
The version lives in `build.yaml` (`version`) and `Directory.Build.props` (`Version`, `AssemblyVersion`, `FileVersion`); keep them equal, the workflow fails otherwise. Put the release notes in `changelog` in `build.yaml`.
|
||||||
|
|
||||||
Every push to `main` builds and tests. If the version has no `v<version>` tag yet, the workflow (`.gitea/workflows/build.yaml`, Gitea Actions) also creates that tag and a release with two assets: the plugin zip and a `manifest.json` that lists this and all earlier releases. So a release is: bump the version, push.
|
Every push to `main` builds and tests. If the version has no `v<version>` tag yet, the workflow (`.gitea/workflows/build.yaml`, Gitea Actions) also creates that tag and a release with the plugin zip, adds the version to `manifest.json` and commits that file back to `main`. So a release is: bump the version, push, and pull the manifest commit afterwards.
|
||||||
|
|
||||||
## Hosting your own repository
|
## Hosting your own repository
|
||||||
|
|
||||||
The `manifest.json` attached to the latest release is a complete plugin repository; the URL under [Installation](#installation) always points at it. The `manifest.json` in the source tree is only a sample of the format.
|
The `manifest.json` in the source tree is a complete plugin repository; the URL under [Installation](#installation) is its raw link on `main`. A copy is attached to every release.
|
||||||
|
|
||||||
To host it elsewhere, build the manifest yourself:
|
To host it elsewhere, build the manifest yourself:
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
- **Client injection**: registered with the File Transformation plugin by reflection at startup; a warning is logged when that plugin is missing. Manual fallbacks are documented.
|
- **Client injection**: registered with the File Transformation plugin by reflection at startup; a warning is logged when that plugin is missing. Manual fallbacks are documented.
|
||||||
- **Watch-time stats**: playback start/progress/stop events are turned into daily per-user aggregates; `GET /Herald/Stats` and a sortable "Stats" tab show them; a daily scheduled task drops rows older than 90 days.
|
- **Watch-time stats**: playback start/progress/stop events are turned into daily per-user aggregates; `GET /Herald/Stats` and a sortable "Stats" tab show them; a daily scheduled task drops rows older than 90 days.
|
||||||
- **Storage**: one SQLite database in Jellyfin's data directory, using the `Microsoft.Data.Sqlite` that the server ships. Versioned migrations, serialized writes.
|
- **Storage**: one SQLite database in Jellyfin's data directory, using the `Microsoft.Data.Sqlite` that the server ships. Versioned migrations, serialized writes.
|
||||||
- **Project plumbing**: xUnit test project (58 tests), `build.yaml` for jprm, a Gitea Actions workflow (build, test, package; tags and releases automatically when the version changes), a sample `manifest.json`, `README.md`, `DECISIONS.md`.
|
- **Project plumbing**: xUnit test project (58 tests), `build.yaml` for jprm, a Gitea Actions workflow (build, test, package; tags and releases automatically when the version changes), the plugin repository `manifest.json`, `README.md`, `DECISIONS.md`.
|
||||||
|
|
||||||
## What was verified, and how
|
## What was verified, and how
|
||||||
|
|
||||||
|
|||||||
+11
-3
@@ -2,18 +2,26 @@
|
|||||||
{
|
{
|
||||||
"guid": "006114bd-2c46-407b-8b31-57199a10fb1c",
|
"guid": "006114bd-2c46-407b-8b31-57199a10fb1c",
|
||||||
"name": "Herald",
|
"name": "Herald",
|
||||||
"description": "Admins write notices that pop up once per user in the web client, optionally requiring the user to accept them, and can see who responded. Also keeps an approximate per-user watch time for the last weeks.\nShowing notices automatically needs the File Transformation plugin (https://github.com/IAmParadox27/jellyfin-plugin-file-transformation), which is not bundled.\n",
|
"description": "Admins write notices that pop up once per user in the web client, optionally requiring the user to accept them, and can see who responded. Also keeps an approximate per-user watch time for the last weeks.\nShowing notices automatically needs the File Transformation plugin (https://github.com/IAmParadox27/jellyfin-plugin-file-transformation), which is not bundled. Without it the client script has to be added by hand, see the README. Microsoft.Data.Sqlite is used from the Jellyfin server itself and is not bundled either.\n",
|
||||||
"overview": "One-time notices for your users and simple watch-time stats",
|
"overview": "One-time notices for your users and simple watch-time stats",
|
||||||
"owner": "JoshiCodes",
|
"owner": "JoshiCodes",
|
||||||
"category": "General",
|
"category": "General",
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"version": "1.0.1.0",
|
||||||
|
"changelog": "Notices now show up when other plugins (MediaBar, Home Screen Sections, ...) also change index.html through File Transformation. Herald has its own entry in the dashboard sidebar.\n",
|
||||||
|
"targetAbi": "10.11.0.0",
|
||||||
|
"sourceUrl": "https://git.joshicodes.de/JoshiCodes/jellyfin-herald/releases/download/v1.0.1.0/herald_1.0.1.0.zip",
|
||||||
|
"checksum": "a65e32fbc536fa668a544739e24766a5",
|
||||||
|
"timestamp": "2026-11-13T21:36:23Z"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "1.0.0.0",
|
"version": "1.0.0.0",
|
||||||
"changelog": "Initial release: notices with acknowledgement tracking, watch-time stats.\n",
|
"changelog": "Initial release: notices with acknowledgement tracking, watch-time stats.\n",
|
||||||
"targetAbi": "10.11.0.0",
|
"targetAbi": "10.11.0.0",
|
||||||
"sourceUrl": "https://git.joshicodes.de/JoshiCodes/jellyfin-herald/releases/download/v1.0.0.0/herald_1.0.0.0.zip",
|
"sourceUrl": "https://git.joshicodes.de/JoshiCodes/jellyfin-herald/releases/download/v1.0.0.0/herald_1.0.0.0.zip",
|
||||||
"checksum": "00000000000000000000000000000000",
|
"checksum": "6bf1e0b971dc178c9b86d48a07d657d2",
|
||||||
"timestamp": "2026-11-13T00:00:00Z"
|
"timestamp": "2026-11-13T18:10:25Z"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user