Compare commits

..

15 Commits

Author SHA1 Message Date
CodeDevMLH
0a0080c889 Update manifest.json for release v1.0.0.1 [skip ci] 2026-01-06 19:05:25 +00:00
CodeDevMLH
b2dd3e4d21 fix name (v1.0.0.1)
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 50s
2026-01-06 20:04:34 +01:00
CodeDevMLH
e4dac0d85c Update manifest.json for release v1.0.0.0 [skip ci] 2026-01-06 18:56:30 +00:00
CodeDevMLH
52bc8022fc Fix download URL formatting in release automation workflows and remove unused test.txt file
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 50s
2026-01-06 19:55:41 +01:00
CodeDevMLH
fb4416f4b3 Update manifest.json for release v1.0.0.0 [skip ci] 2026-01-06 18:40:10 +00:00
CodeDevMLH
a67c4ecbe7 Add new test.txt file
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 49s
2026-01-06 19:39:21 +01:00
CodeDevMLH
972c914dab Remove outdated setup instructions for automatic updates in Plugin B 2026-01-06 19:38:43 +01:00
CodeDevMLH
60825b7e2f Update manifest.json for release v1.0.0.0 [skip ci] 2026-01-06 18:36:23 +00:00
CodeDevMLH
5d23594e08 Remove outdated JPRM documentation and release automation workflow
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 50s
2026-01-06 19:35:33 +01:00
CodeDevMLH
2cccb139bf Enhance release automation to update central manifest with plugin GUID and target ABI 2026-01-06 19:34:16 +01:00
CodeDevMLH
f37b946c0c Update manifest.json for release v1.0.0.0 [skip ci] 2026-01-06 17:26:55 +00:00
CodeDevMLH
51c3eec58a Merge branch 'main' of ssh://git.mahom03-spacecloud.de:44322/CodeDevMLH/jellyfin-plugin-media-bar-enhanced
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 47s
2026-01-06 18:26:05 +01:00
CodeDevMLH
236def9fed Update manifest.json for release v1.0.0.0 [skip ci] 2026-01-06 17:26:04 +00:00
CodeDevMLH
f864b1105e Update imageUrl in manifest.json to correct path 2026-01-06 18:26:03 +01:00
CodeDevMLH
353db1eab1 new logo
All checks were successful
Auto Release Plugin / build-and-release (push) Successful in 49s
2026-01-06 18:25:13 +01:00
10 changed files with 174 additions and 337 deletions

View File

@@ -40,6 +40,11 @@ jobs:
echo "Detected Version: $VERSION" echo "Detected Version: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "TARGET_ABI=$TARGET_ABI" >> $GITHUB_ENV
# Also export GUID for later use
PLUGIN_GUID=$(jq -r '.[0].guid' manifest.json)
echo "PLUGIN_GUID=$PLUGIN_GUID" >> $GITHUB_ENV
# Escape newlines in changelog for GITHUB_ENV # Escape newlines in changelog for GITHUB_ENV
echo "CHANGELOG<<EOF" >> $GITHUB_ENV echo "CHANGELOG<<EOF" >> $GITHUB_ENV
@@ -71,7 +76,7 @@ jobs:
REPO_OWNER="${{ github.repository_owner }}" REPO_OWNER="${{ github.repository_owner }}"
REPO_NAME="${{ github.event.repository.name }}" REPO_NAME="${{ github.event.repository.name }}"
VERSION="${{ env.VERSION }}" VERSION="${{ env.VERSION }}"
DOWNLOAD_URL="https://git.mahom03-spacecloud.de/${{ github.repository }}/releases/download/v$VERSION/Jellyfin.Plugin.MediaBarEnhanced.zip" DOWNLOAD_URL="https://git.mahom03-spacecloud.de/$REPO_OWNER/$REPO_NAME/releases/download/v$VERSION/Jellyfin.Plugin.MediaBarEnhanced.zip"
echo "Updating manifest.json with:" echo "Updating manifest.json with:"
echo "Hash: ${{ env.ZIP_HASH }}" echo "Hash: ${{ env.ZIP_HASH }}"
@@ -101,3 +106,78 @@ jobs:
tag_name: "v${{ env.VERSION }}" tag_name: "v${{ env.VERSION }}"
draft: false draft: false
prerelease: false prerelease: false
# Update Message in Remote Repository
- name: Checkout Central Manifest Repo
uses: actions/checkout@v6
with:
repository: ${{ github.repository_owner }}/jellyfin-plugin-manifest
path: central-manifest
token: ${{ secrets.JELLYFIN_PLUGIN_MANIFEST_UPDATER_PAT }}
- name: Update Central Manifest
shell: bash
run: |
cd central-manifest
# 1. Get info from previous steps
VERSION="${{ env.VERSION }}"
HASH="${{ env.ZIP_HASH }}"
TIME="${{ env.BUILD_TIME }}"
DOWNLOAD_URL="https://git.mahom03-spacecloud.de/${{ github.repository }}/releases/download/v$VERSION/Jellyfin.Plugin.MediaBarEnhanced.zip"
# 2. Get info from env
PLUGIN_GUID="${{ env.PLUGIN_GUID }}"
CHANGELOG="${{ env.CHANGELOG }}"
TARGET_ABI="${{ env.TARGET_ABI }}"
echo "Updating Central Manifest for Plugin GUID: $PLUGIN_GUID"
# 3. Update/Prepend entry in central manifest.json
# Logic:
# - If array is empty or new version != old version: PREPEND new entry
# - If new version == old version: OVERWRITE (update) existing entry (re-release)
jq --arg guid "$PLUGIN_GUID" \
--arg hash "$HASH" \
--arg time "$TIME" \
--arg url "$DOWNLOAD_URL" \
--arg ver "$VERSION" \
--arg changelog "$CHANGELOG" \
--arg abi "$TARGET_ABI" \
'map(if .guid == $guid then
if .versions[0].version != $ver then
# New Version -> Prepend
.versions = [{
"version": $ver,
"changelog": $changelog,
"targetAbi": $abi,
"sourceUrl": $url,
"checksum": $hash,
"timestamp": $time
}] + .versions
else
# Same Version -> Update existing (overwrite top)
.versions[0].changelog = $changelog |
.versions[0].targetAbi = $abi |
.versions[0].sourceUrl = $url |
.versions[0].checksum = $hash |
.versions[0].timestamp = $time
end
else . end)' \
manifest.json > manifest.json.tmp && mv manifest.json.tmp manifest.json
- name: Commit and Push Central Manifest
run: |
cd central-manifest
git config user.name "CodeDevMLH"
git config user.email "145071728+CodeDevMLH@users.noreply.github.com"
# Check if there are changes
if [[ -n $(git status -s) ]]; then
git add manifest.json
git commit -m "Auto-Update MediaBar Enhanced to v${{ env.VERSION }}"
git push
else
echo "No changes to central manifest."
fi

View File

@@ -39,6 +39,11 @@ jobs:
echo "Detected Version: $VERSION" echo "Detected Version: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "TARGET_ABI=$TARGET_ABI" >> $GITHUB_ENV
# Also export GUID for later use
PLUGIN_GUID=$(jq -r '.[0].guid' manifest.json)
echo "PLUGIN_GUID=$PLUGIN_GUID" >> $GITHUB_ENV
# Escape newlines in changelog for GITHUB_ENV # Escape newlines in changelog for GITHUB_ENV
echo "CHANGELOG<<EOF" >> $GITHUB_ENV echo "CHANGELOG<<EOF" >> $GITHUB_ENV
@@ -99,3 +104,78 @@ jobs:
draft: false draft: false
prerelease: false prerelease: false
generate_release_notes: true generate_release_notes: true
# Update Message in Remote Repository
- name: Checkout Central Manifest Repo
uses: actions/checkout@v6
with:
repository: ${{ github.repository_owner }}/jellyfin-plugin-manifest
path: central-manifest
token: ${{ secrets.JELLYFIN_PLUGIN_MANIFEST_UPDATER_PAT }}
- name: Update Central Manifest
shell: bash
run: |
cd central-manifest
# 1. Get info from previous steps
VERSION="${{ env.VERSION }}"
HASH="${{ env.ZIP_HASH }}"
TIME="${{ env.BUILD_TIME }}"
DOWNLOAD_URL="https://github.com/$REPO_OWNER/$REPO_NAME/releases/download/v$VERSION/Jellyfin.Plugin.MediaBarEnhanced.zip"
# 2. Get info from env
PLUGIN_GUID="${{ env.PLUGIN_GUID }}"
CHANGELOG="${{ env.CHANGELOG }}"
TARGET_ABI="${{ env.TARGET_ABI }}"
echo "Updating Central Manifest for Plugin GUID: $PLUGIN_GUID"
# 3. Update/Prepend entry in central manifest.json
# Logic:
# - If array is empty or new version != old version: PREPEND new entry
# - If new version == old version: OVERWRITE (update) existing entry (re-release)
jq --arg guid "$PLUGIN_GUID" \
--arg hash "$HASH" \
--arg time "$TIME" \
--arg url "$DOWNLOAD_URL" \
--arg ver "$VERSION" \
--arg changelog "$CHANGELOG" \
--arg abi "$TARGET_ABI" \
'map(if .guid == $guid then
if .versions[0].version != $ver then
# New Version -> Prepend
.versions = [{
"version": $ver,
"changelog": $changelog,
"targetAbi": $abi,
"sourceUrl": $url,
"checksum": $hash,
"timestamp": $time
}] + .versions
else
# Same Version -> Update existing (overwrite top)
.versions[0].changelog = $changelog |
.versions[0].targetAbi = $abi |
.versions[0].sourceUrl = $url |
.versions[0].checksum = $hash |
.versions[0].timestamp = $time
end
else . end)' \
manifest.json > manifest.json.tmp && mv manifest.json.tmp manifest.json
- name: Commit and Push Central Manifest
run: |
cd central-manifest
git config user.name "CodeDevMLH"
git config user.email "145071728+CodeDevMLH@users.noreply.github.com"
# Check if there are changes
if [[ -n $(git status -s) ]]; then
git add manifest.json
git commit -m "Auto-Update MediaBar Enhanced to v${{ env.VERSION }}"
git push
else
echo "No changes to central manifest."
fi

View File

@@ -12,7 +12,7 @@
<!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> --> <!-- <TreatWarningsAsErrors>false</TreatWarningsAsErrors> -->
<Title>Jellyfin Media Bar Enhanced Plugin</Title> <Title>Jellyfin Media Bar Enhanced Plugin</Title>
<Authors>CodeDevMLH</Authors> <Authors>CodeDevMLH</Authors>
<Version>1.0.0.0</Version> <Version>1.0.0.1</Version>
<RepositoryUrl>https://git.mahom03-spacecloud.de/CodeDevMLH/Media-Bar-Plugin</RepositoryUrl> <RepositoryUrl>https://git.mahom03-spacecloud.de/CodeDevMLH/Media-Bar-Plugin</RepositoryUrl>
</PropertyGroup> </PropertyGroup>

View File

@@ -59,7 +59,7 @@ namespace Jellyfin.Plugin.MediaBarEnhanced
} }
/// <inheritdoc /> /// <inheritdoc />
public override string Name => "Media Bar"; public override string Name => "Media Bar Enhanced";
/// <inheritdoc /> /// <inheritdoc />
public override Guid Id => Guid.Parse("d7e11d57-819b-4bdd-a88d-53c5f5560225"); public override Guid Id => Guid.Parse("d7e11d57-819b-4bdd-a88d-53c5f5560225");

104
jprm.md
View File

@@ -1,104 +0,0 @@
# Using JPRM (Jellyfin Plugin Repository Manager)
Wenn du mehrere Plugins hast, ist es oft einfacher, den offiziellen **JPRM** (Jellyfin Plugin Repository Manager) zu nutzen. Anstatt dass jedes Plugin sich selbst in die Manifest-Datei "pusht" (wie in deinem aktuellen Script), "pullt" das zentrale Repo automatisch die neuesten Releases deiner Plugins.
## Wie es funktioniert
1. Du hast ein zentrales Repo (z.B. `jellyfin-plugin-manifest`).
2. Dort läuft ein Script (JPRM), das eine Liste von deinen Plugin-Repos durchgeht.
3. Es prüft, ob es neue Releases gibt.
4. Es baut die `manifest.json` komplett neu.
## Schritt 1: Das zentrale Repo vorbereiten
Erstelle ein neues Repo (oder nimm dein vorhandenes `jellyfin-plugin-manifest`) und erstelle eine Datei namens `config.json` (oder ähnlich), die deine Plugins auflistet.
Beispiel `manifest-config.json` für JPRM:
```json
[
{
"Url": "https://github.com/CodeDevMLH/Media-Bar-Plugin",
"Branch": "main",
"Package": "Jellyfin.Plugin.MediaBarEnhanced"
},
{
"Url": "https://github.com/CodeDevMLH/Anderes-Plugin",
"Branch": "main",
"Package": "Jellyfin.Plugin.Anderes"
}
]
```
## Schritt 2: Der GitHub Workflow (im zentralen Repo)
In deinem **zentralen Repo** erstellst du einen Workflow `.github/workflows/update-manifest.yaml`. Dieser läuft z.B. jede Nacht oder wenn du ihn manuell startest.
```yaml
name: Generate Manifest
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # Täglich um Mitternacht
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install JPRM
run: pip install jprm
- name: Generate Manifest
run: |
# jprm repo init --help für mehr infos
# Hier ein einfaches Beispielkommando (die genauen Flags hängen von deiner Struktur ab)
jprm repo build --url https://github.com/CodeDevMLH/Media-Bar-Plugin .
# Alternativ: Nutze ein fertiges Action-Script oder schreibe ein kleines Python Script,
# das die config.json liest und jprm aufruft.
- name: Commit & Push
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update repository manifest
file_pattern: manifest.json
```
*Hinweis: Der offizielle JPRM ist sehr mächtig, aber manchmal etwas komplex in der Einrichtung für einfache Setups. Viele User nutzen stattdessen ein einfacheres Python-Script.*
## Alternative: Einfaches Python Script (Empfohlen für den Start)
Ein simples Script, das du in deinem zentralen Repo ablegst und im Action-Workflow ausführst:
```python
import json
import requests
import hashlib
# Konfiguration
PLUGINS = [
{"user": "CodeDevMLH", "repo": "Media-Bar-Plugin", "guid": "..."}
]
FINAL_MANIFEST = []
for p in PLUGINS:
# 1. Hole Latest Release vpm GitHub API
resp = requests.get(f"https://api.github.com/repos/{p['user']}/{p['repo']}/releases/latest")
data = resp.json()
# 2. Lade assets herunter, berechne Hash
# 3. Baue JSON Objekt
# ...
# Speichere final_manifest.json
```
## Fazit
- **Push-Methode (Deine aktuelle Lösung):** Gut für den Anfang. Du hast sofort Kontrolle. Jedes Plugin "kümmert sich selbst".
- **Pull-Methode (JPRM):** Besser wenn du 5+ Plugins hast. Das zentrale Repo hat die Hoheit.

BIN
logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 MiB

After

Width:  |  Height:  |  Size: 312 KiB

BIN
logos/MediaBar_logo_mod.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 KiB

View File

@@ -6,15 +6,23 @@
"overview": "Media Bar for Jellyfin", "overview": "Media Bar for Jellyfin",
"owner": "CodeDevMLH", "owner": "CodeDevMLH",
"category": "General", "category": "General",
"imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/Media-Bar-Plugin/raw/branch/main/logo.png", "imageUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/raw/branch/main/logo.png",
"versions": [ "versions": [
{
"version": "1.0.0.1",
"changelog": "Initial release",
"targetAbi": "10.11.0.0",
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.0.0.1/Jellyfin.Plugin.MediaBarEnhanced.zip",
"checksum": "da9766deb7b81b2b41000ac139fa4d5b",
"timestamp": "2026-01-06T19:05:24Z"
},
{ {
"version": "1.0.0.0", "version": "1.0.0.0",
"changelog": "Initial release", "changelog": "Initial release",
"targetAbi": "10.11.0.0", "targetAbi": "10.11.0.0",
"sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.0.0.0/Jellyfin.Plugin.MediaBarEnhanced.zip", "sourceUrl": "https://git.mahom03-spacecloud.de/CodeDevMLH/jellyfin-plugin-media-bar-enhanced/releases/download/v1.0.0.0/Jellyfin.Plugin.MediaBarEnhanced.zip",
"checksum": "caf7dc027bb55b915e09613a534c6e74", "checksum": "2ba7cc7f238f6aa7097628797935b903",
"timestamp": "2026-01-06T01:43:51Z" "timestamp": "2026-01-06T18:56:30Z"
} }
] ]
} }

View File

@@ -1,157 +0,0 @@
name: Auto Release Plugin
on:
push:
branches:
- main
paths-ignore:
- '.github/**'
- 'README.md'
- 'jellyfin.ruleset'
- '.gitignore'
- '.editorconfig'
- 'LICENSE'
- 'logo.png'
jobs:
build-and-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '9.x'
- name: Read Version from Manifest
id: read_version
run: |
VERSION=$(jq -r '.[0].versions[0].version' manifest.json)
CHANGELOG=$(jq -r '.[0].versions[0].changelog' manifest.json)
TARGET_ABI=$(jq -r '.[0].versions[0].targetAbi' manifest.json)
echo "Detected Version: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
# Escape newlines in changelog for GITHUB_ENV
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
echo "$CHANGELOG" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Build and Zip
shell: bash
run: |
# Inject version from manifest into the build
dotnet build Jellyfin.Plugin.MediaBarEnhanced/Jellyfin.Plugin.MediaBarEnhanced.csproj --configuration Release --output bin/Publish /p:Version=${{ env.VERSION }} /p:AssemblyVersion=${{ env.VERSION }}
cd bin/Publish
zip -r Jellyfin.Plugin.MediaBarEnhanced.zip *
cd ../..
# Calculate hash
HASH=$(md5sum bin/Publish/Jellyfin.Plugin.MediaBarEnhanced.zip | awk '{ print $1 }')
TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
# Export variables for next steps
echo "ZIP_HASH=$HASH" >> $GITHUB_ENV
echo "BUILD_TIME=$TIME" >> $GITHUB_ENV
echo "ZIP_PATH=bin/Publish/Jellyfin.Plugin.MediaBarEnhanced.zip" >> $GITHUB_ENV
- name: Update Local manifest.json (Optional)
shell: bash
run: |
REPO_OWNER="${{ github.repository_owner }}"
REPO_NAME="${{ github.event.repository.name }}"
VERSION="${{ env.VERSION }}"
DOWNLOAD_URL="https://github.com/$REPO_OWNER/$REPO_NAME/releases/download/v$VERSION/Jellyfin.Plugin.MediaBarEnhanced.zip"
echo "Updating local manifest.json with:"
echo "Hash: ${{ env.ZIP_HASH }}"
echo "Time: ${{ env.BUILD_TIME }}"
echo "Url: $DOWNLOAD_URL"
jq --arg hash "${{ env.ZIP_HASH }}" \
--arg time "${{ env.BUILD_TIME }}" \
--arg url "$DOWNLOAD_URL" \
'.[0].versions[0].checksum = $hash | .[0].versions[0].timestamp = $time | .[0].versions[0].sourceUrl = $url' \
manifest.json > manifest.json.tmp && mv manifest.json.tmp manifest.json
- name: Commit Local manifest.json
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "Update manifest.json for release v${{ env.VERSION }} [skip ci]"
file_pattern: manifest.json
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{ env.VERSION }}"
name: "v${{ env.VERSION }}"
# body: ${{ env.CHANGELOG }}
files: ${{ env.ZIP_PATH }}
draft: false
prerelease: false
generate_release_notes: true
# Update Message in Remote Repository
- name: Checkout Central Manifest Repo
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/jellyfin-plugin-manifest
path: central-manifest
token: ${{ secrets.CENTRAL_REPO_PAT }}
- name: Update Central Manifest
shell: bash
run: |
cd central-manifest
# 1. Get info from previous steps
VERSION="${{ env.VERSION }}"
HASH="${{ env.ZIP_HASH }}"
TIME="${{ env.BUILD_TIME }}"
# URL points to the RELEASE we just created in the CURRENT repo
DOWNLOAD_URL="https://github.com/${{ github.repository }}/releases/download/v$VERSION/Jellyfin.Plugin.MediaBarEnhanced.zip"
# 2. Extract GUID from the *built* artifact or the source manifest (in parent dir)
# We use the source manifest from the checkout in '..'
PLUGIN_GUID=$(jq -r '.[0].guid' ../manifest.json)
echo "Updating Central Manifest for Plugin GUID: $PLUGIN_GUID"
# 3. Update the specific plugin entry in the central manifest.json
# This logic finds the object with matching guid, and updates its first version entry.
jq --arg guid "$PLUGIN_GUID" \
--arg hash "$HASH" \
--arg time "$TIME" \
--arg url "$DOWNLOAD_URL" \
--arg ver "$VERSION" \
'map(if .guid == $guid then
.versions[0].version = $ver |
.versions[0].checksum = $hash |
.versions[0].timestamp = $time |
.versions[0].sourceUrl = $url
else . end)' \
manifest.json > manifest.json.tmp && mv manifest.json.tmp manifest.json
- name: Commit and Push Central Manifest
run: |
cd central-manifest
git config user.name "GitHub Action"
git config user.email "action@github.com"
# Check if there are changes
if [[ -n $(git status -s) ]]; then
git add manifest.json
git commit -m "Update MediaBar Enhanced to v${{ env.VERSION }}"
git push
else
echo "No changes to central manifest."
fi

View File

@@ -1,70 +0,0 @@
# Anleitung: Automatische Updates für "Plugin B" im Media-Bar Manifest
Damit dein Plugin B (das andere Repo) automatisch seine Version im `manifest.json` des **Media-Bar-Plugin** Repos aktualisiert, musst du die `release_automation.yml` **in Repo B** anpassen.
Das Prinzip ist dasselbe wie beim zentralen Repo: Repo B checkt Repo A aus und updatet sich selbst.
## Schritt 1: Secret anlegen
Du brauchst ein **PAT (Personal Access Token)**, das Zugriff auf das **Media-Bar-Plugin** Repo hat.
- Erstelle das Secret `MEDIA_BAR_REPO_PAT` im **Plugin B** Repo.
## Schritt 2: Workflow in Plugin B anpassen
Füge diesen Job-Step am Ende der `release_automation.yml` von **Plugin B** hinzu:
```yaml
# ------------------------------------------------------------------
# UPDATE MEDIA BAR MANIFEST (Cross-Promotion)
# ------------------------------------------------------------------
- name: Checkout Media Bar Repo
uses: actions/checkout@v4
with:
repository: CodeDevMLH/Media-Bar-Plugin # <--- Ziel-Repo
path: media-bar-repo
token: ${{ secrets.MEDIA_BAR_REPO_PAT }}
- name: Update Entry in Media Bar Manifest
shell: bash
run: |
cd media-bar-repo
# Info vom aktuellen Release (Repo B)
VERSION="${{ env.VERSION }}"
HASH="${{ env.ZIP_HASH }}"
TIME="${{ env.BUILD_TIME }}"
# URL zum Release von Repo B
DOWNLOAD_URL="https://github.com/${{ github.repository }}/releases/download/v$VERSION/Jellyfin.Plugin.MeinTollesPlugin.zip" # <--- ANPASSEN
# GUID von Plugin B (Muss fest hinterlegt sein oder aus dem lokalen manifest kommen)
PLUGIN_GUID="a1b2c3d4-..." # <--- GUID von Plugin B HIER EINTRAGEN
echo "Updating Media Bar Manifest for GUID: $PLUGIN_GUID"
# Update Logic (findet Eintrag anhand GUID und updatet ihn)
jq --arg guid "$PLUGIN_GUID" \
--arg hash "$HASH" \
--arg time "$TIME" \
--arg url "$DOWNLOAD_URL" \
--arg ver "$VERSION" \
'map(if .guid == $guid then
.versions[0].version = $ver |
.versions[0].checksum = $hash |
.versions[0].timestamp = $time |
.versions[0].sourceUrl = $url
else . end)' \
manifest.json > manifest.json.tmp && mv manifest.json.tmp manifest.json
- name: Commit and Push to Media Bar Repo
run: |
cd media-bar-repo
git config user.name "GitHub Action"
git config user.email "action@github.com"
if [[ -n $(git status -s) ]]; then
git add manifest.json
git commit -m "Auto-Update Plugin B to v${{ env.VERSION }}"
git push
else
echo "No changes needed."
fi
```