Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d849e4276a | |||
| 34463bb8df |
@@ -0,0 +1,93 @@
|
||||
name: Build and Release Plugin
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: '10.0.x'
|
||||
|
||||
- name: Build Plugin
|
||||
run: dotnet build JellyfinPlugin/JellyfinPlugin.csproj -c Release
|
||||
|
||||
- name: Create ZIP Archive
|
||||
run: |
|
||||
cd JellyfinPlugin/bin/Release/net10.0/
|
||||
zip -j ../../../../BlackBarRemover_${{ github.ref_name }}.zip *
|
||||
|
||||
- name: Generate Checksum
|
||||
id: checksum
|
||||
run: |
|
||||
MD5_SUM=$(md5sum BlackBarRemover_${{ github.ref_name }}.zip | awk '{print $1}')
|
||||
echo "md5=$MD5_SUM" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create Gitea Release
|
||||
run: |
|
||||
API_URL="${{ github.api_url }}"
|
||||
REPO="${{ github.repository }}"
|
||||
TOKEN="${{ github.token }}"
|
||||
TAG="${{ github.ref_name }}"
|
||||
|
||||
# Create Release
|
||||
RELEASE_RES=$(curl -s -X POST "$API_URL/repos/$REPO/releases" \
|
||||
-H "Authorization: token $TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"tag_name\":\"$TAG\", \"name\":\"Release $TAG\", \"body\":\"Automated release\", \"draft\":false, \"prerelease\":false}")
|
||||
|
||||
REL_ID=$(echo "$RELEASE_RES" | grep -o '"id":[0-9]*' | head -1 | cut -d':' -f2)
|
||||
|
||||
# Upload Asset
|
||||
curl -s -X POST "$API_URL/repos/$REPO/releases/$REL_ID/assets" \
|
||||
-H "Authorization: token $TOKEN" \
|
||||
-F "attachment=@BlackBarRemover_$TAG.zip"
|
||||
|
||||
- name: Update manifest.json
|
||||
run: |
|
||||
git config user.name "Gitea Actions"
|
||||
git config user.email "actions@gitea.local"
|
||||
|
||||
git checkout -B manifest
|
||||
|
||||
VERSION="${{ github.ref_name }}"
|
||||
VERSION="${VERSION#v}" # remove 'v' prefix
|
||||
|
||||
cat > manifest.json <<EOF
|
||||
[
|
||||
{
|
||||
"guid": "12345678-1234-1234-1234-1234567890ab",
|
||||
"name": "Black Bar Remover",
|
||||
"description": "Automatically detects and removes black bars from video files.",
|
||||
"overview": "Automatically detects and removes black bars from video files via CSS or FFmpeg.",
|
||||
"owner": "karol",
|
||||
"category": "Playback",
|
||||
"imageUrl": "",
|
||||
"versions": [
|
||||
{
|
||||
"version": "$VERSION",
|
||||
"changelog": "Automated Release ${{ github.ref_name }}",
|
||||
"targetAbi": "12.0.0.0",
|
||||
"sourceUrl": "${{ github.server_url }}/${{ github.repository }}",
|
||||
"checksum": "${{ steps.checksum.outputs.md5 }}",
|
||||
"timestamp": "$(date -u +'%Y-%m-%dT%H:%M:%SZ')",
|
||||
"repositoryUrl": "${{ github.server_url }}/${{ github.repository }}/releases/download/${{ github.ref_name }}/BlackBarRemover_${{ github.ref_name }}.zip"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
EOF
|
||||
|
||||
git add manifest.json
|
||||
git commit -m "Update manifest for ${{ github.ref_name }}"
|
||||
git push -f origin manifest
|
||||
@@ -18,6 +18,24 @@ A Jellyfin plugin that automatically detects and removes black bars (letterboxin
|
||||
|
||||
## Installation
|
||||
|
||||
### Method 1: Jellyfin Repository (Recommended & Easiest)
|
||||
|
||||
1. Open your Jellyfin Dashboard and navigate to **Plugins** -> **Repositories**.
|
||||
2. Click the `+` icon to add a new repository.
|
||||
3. Enter `Black Bar Remover` as the name.
|
||||
4. Enter `https://gitea.local.labus.uk/karol/blackBarRemover/raw/branch/manifest/manifest.json` as the Repository URL and save.
|
||||
5. Go back to the **Catalog** tab, find "Black Bar Remover" under the Playback category, and click **Install**.
|
||||
6. Restart the Jellyfin server.
|
||||
|
||||
### Method 2: Manual Installation from Releases
|
||||
|
||||
1. Go to the **Releases** tab on the Gitea repository page.
|
||||
2. Download the latest `BlackBarRemover_vX.X.zip` file.
|
||||
3. Extract the contents of the ZIP file into a new folder named `BlackBarRemover` inside your Jellyfin plugins directory (e.g., `/var/lib/jellyfin/plugins/BlackBarRemover/`).
|
||||
4. Restart the Jellyfin server.
|
||||
|
||||
### Method 3: Building from Source
|
||||
|
||||
1. Clone this repository.
|
||||
2. Build the plugin using the .NET 10 SDK:
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user