Development Guide
Contributing
We welcome contributions! Hereβs how to get started:
- Fork the repository.
- In the scripts directory, use build-branch.ps1 and build-release.ps1 to easily test changes. Be sure to set the GitHubUsername and any required parameters.
- Iteratively develop code. Jellyfin and C# can be a bit unforgiving.
- Test thoroughly on 10.11.* and 10.10.7 docker instances.
- Submit a pull request.
Planned Features
- Add a modal dialog when the network options are double-clicked from the active or available network multiselect. Options include βAdd to Selected Networksβ (if in available) or βRemove from Selected Networksβ (if active).
- Faster refreshes that target only the metadata items that have been changed.
- Change the smart sort to include cast and directors as criteria, and watched media.
- Fetch additional content from Jellyseerr before the built-in Jellyfin metadata refresh.
Completed Features
- Extract the request favorites function from the sync task. The favorites function can be triggered directly from the Favorite event handler in Jellyfin. See Issue #12.
- Support for Jellyfin 10.11.*! See Issue #1.
- Change sort order based on user preference or implement a random sort order plugin.
- Allow users to upload a custom image for promo videos.
- Adding new feature from Issue #37 βMixed Movies and Showsβ to allow users to switch from a single library to separate Movies and Shows libraries.
Dependencies
This plugin uses:
- .NET 8.0 - Target framework for Jellyfin 10.10.7
- .NET 9.0 - Target framework for Jellyfin 10.11.0
- .NET 10.0 - Target framework for Jellyfin 12.0
- Jellyfin NuGet - Plugin SDK packages (version-specific)
- ASP.NET Core - For API endpoints
- Microsoft.Extensions (8.0.1 for net8.0, 9.0.10 for net9.0, 10.0.11 for net10.0) - For dependency injection and logging
- Newtonsoft.Json - For JSON serialization
- PowerShell 7 or greater - For build scripts
- VS Code - IDE, Visual Studio probably also works
The project automatically selects the correct target framework and package versions based on the JellyfinVersion build property.
Building the Plugin
Recommended to use the /scripts/build-branch.ps1 PowerShell script.
- Clone the repository
git clone https://github.com/kinggeorges12/JellyBridge.git cd JellyBridge - Restore dependencies
dotnet restore src\Jellyfin.Plugin.JellyBridge\JellyBridge.csproj -
Build the plugin
For Jellyfin 10.10.7 (net8.0):
dotnet build src\Jellyfin.Plugin.JellyBridge\JellyBridge.csproj --configuration Release --warnaserror -p:JellyfinVersion=10.10.7For Jellyfin 10.11.0 (net9.0):
dotnet build src\Jellyfin.Plugin.JellyBridge\JellyBridge.csproj --configuration Release --warnaserror -p:JellyfinVersion=10.11.0For Jellyfin 10.11.0 (net9.0):
dotnet build src\Jellyfin.Plugin.JellyBridge\JellyBridge.csproj --configuration Release --warnaserror -p:JellyfinVersion=12.0 -
Publish a new release
Add the metadata.json to the release. Zip the .dll and metadata and place in the release directory.
$metaJson = @{ guid = $pluginInfo.guid name = $pluginInfo.name description = $pluginInfo.description owner = $pluginInfo.owner category = $pluginInfo.category version = $ver_sub changelog = $ChangelogText targetAbi = $minAbi timestamp = $timestamp status = "Active" autoUpdate = $true assemblies = @("JellyBridge.dll") } Compress-Archive -Path $dllPath, $metaPath -DestinationPath $zipPath -Force -
Update the manifest
Add an entry in manifest.json for your new release, pointing to the zip file in the release directory.
$entry = @{ version = $ver_sub changelog = "Jellyfin $($t.JellyfinVersion): $ChangelogText" targetAbi = $minAbi sourceUrl = "https://raw.githubusercontent.com/$GitHubUsername/JellyBridge/$Branch/release/$zipName" checksum = $checksum timestamp = $timestamp dependencies = @() }
Manual Installation
Recommended to publish releases through the manifest and update plugins through the Jellyfin UI. I have not had any luck using local releases, although you may find online resources with better instructions.
After building, copy the DLL to your Jellyfin plugins folder:
- Navigate to the build output directory based on your Jellyfin version:
- Jellyfin 10.10.7:
src\Jellyfin.Plugin.JellyBridge\bin\Release\net8.0\ - Jellyfin 10.11.0:
src\Jellyfin.Plugin.JellyBridge\bin\Release\net9.0\ - Jellyfin 12.0:
src\Jellyfin.Plugin.JellyBridge\bin\Release\net10.0\
- Jellyfin 10.10.7:
- Copy the
JellyBridge.dllfile - Place it in your Jellyfin plugins directory:
- Linux:
/var/lib/jellyfin/plugins/ - Windows:
C:\ProgramData\Jellyfin\plugins\ - Docker: volume mount to your plugins directory
- Linux:
- Restart Jellyfin
Scripts
The project includes several useful PowerShell scripts in the scripts directory:
check-models.ps1 - Model Validation Script
Purpose: Validates all generated C# files for missing classes, enums, and conversion issues.
Usage:
pwsh -File scripts/check-models.ps1
What it checks:
- Empty or very small files
- Missing using statements
- Unresolved class references
- Type mismatches
- Missing required enums
- Duplicate class declarations
- Duplicate properties within classes
- Invalid property names
When to use: After running convert-models.ps1 to ensure the conversion was successful.
convert-models.ps1 - TypeScript to C# Conversion Script
Purpose: Converts TypeScript models from the Jellyseerr source code to C# classes.
Usage:
pwsh -File scripts/convert-models.ps1
What it does:
- Reads TypeScript files from
codebase/seerr-main - Converts them to C# classes
- Applies naming conventions and type mappings
- Outputs to
src/Jellyfin.Plugin.JellyBridge/JellyseerrModel/ - Uses configuration from
convert-config.psd1
When to use: When you need to update the Jellyseerr models (e.g., after Jellyseerr releases a new version with API changes).
convert-config.psd1 - Model Conversion Configuration
Purpose: Configuration file for the model conversion script.
Setup Required: Before running the convert-models script, you need to have the Jellyseerr source code:
# Clone the Jellyseerr repository
git clone https://github.com/jellyseerr/jellyseerr.git codebase/seerr-main
Contents:
- Input/output directory mappings (
codebase/seerr-main/server/*βJellyseerrModel/*) - Type conversion rules (e.g., number to double patterns)
- Blocked classes (classes that are too complex to convert)
- Namespace mapping
- JSON property generation for serialization
Note: Edit this file when you need to adjust how TypeScript models are converted to C#.
convert-permissions.ps1 - Permission Enum Conversion Script
Purpose: Converts the Jellyseerr permission enum from TypeScript into Permissions.cs.
Usage:
pwsh -File scripts/convert-permissions.ps1
What it does:
- Reads
codebase/seerr-main/server/lib/permissions.ts - Extracts the exported
Permissionenum - Writes
src/Jellyfin.Plugin.JellyBridge/JellyseerrModel/Server/Permissions.cs
When to use: When Jellyseerr updates its permission constants and the generated C# enum needs to stay in sync. Run this after convert-models
build-branch.ps1 - Branch Release Script
Purpose: Builds and releases the plugin for a specific branch with automatic versioning.
Usage:
pwsh -File scripts/build-branch.ps1 -Changelog "Description of changes" -Branch "feature" -ReleaseType "patch"
Parameters:
-Changelog(optional): Description of changes in this release-Branch(optional, default: βfeatureβ): Git branch to build and release-ReleaseType(optional, default: βpatchβ): Version increment type - βmajorβ, βminorβ, or βpatchβ-Version(optional): Specific version number (if not provided, auto-increments from latest release)
What it does:
- Auto-calculates version from latest release if not provided
- Builds for Jellyfin 10.10.7 (net8.0) and 10.11.0 (net9.0) and 12.0 (net10.0)
- Creates release ZIP files with proper ABI targeting
- Updates manifest.json with new version entries
- Commits and pushes changes to the specified branch
When to use: For regular development releases on feature branches.
build-local.ps1 - Local Development Build Script
Purpose: Builds the plugin DLL for local testing and optionally copies to Docker test instance.
Usage:
pwsh -File scripts/build-local.ps1 [-Clean] [-Docker] [-DockerContainerName "name"] [-DockerPluginPath "path"]
Parameters:
-Clean: Clean previous builds before building-Docker: Copy DLL to Docker test instance after build-DockerContainerName: Name of Docker container (default: βtest-jellyfinβ)-DockerPluginPath: Path to plugins directory in Docker (default: Windows Docker path)
What it does:
- Builds the plugin for Jellyfin 10.10.7 (net8.0)
- Optionally copies DLL to Docker test instance
- Creates meta.json for local testing
When to use: For local development and testing.
build-release.ps1 - Main Branch Release Script
Purpose: Creates an official release for the main branch with GitHub release creation.
Usage:
pwsh -File scripts/build-release.ps1 -Version "1.0.0" -Changelog "Release description" [-Release]
Parameters:
-Version(required): Version number in format X.Y.Z-Changelog(required): Release description-Release: Create GitHub release (default: false, creates draft)-GitHubUsername(optional): GitHub username (default: βkinggeorges12β)
What it does:
- Builds for Jellyfin 10.10.7 and 10.11.0 and 12.0
- Creates release ZIP files
- Updates manifest.json
- Creates GitHub release (draft or published)
- Commits and pushes to main branch
When to use: For official releases on the main branch.
Project Structure
Jellyfin.Plugin.JellyBridge/
βββ Assets/ # Image assets to generate promo videos
β βββ movie.png
β βββ season.png
β βββ show.png
βββ Attributes/ # Plugin attributes
β βββ JellyfinVersionAttribute.cs
βββ BridgeModels/ # Data models
β βββ BridgeConfiguration.cs
β βββ JellyMatch.cs
β βββ JellyseerrApiResults.cs
β βββ ... (other bridge models)
βββ Configuration/ # Configuration classes
β βββ ConfigurationPage.html
β βββ ConfigurationPage.js
β βββ PluginConfiguration.cs
βββ Controllers/ # REST API controllers
β βββ AdvancedSettingsController.cs
β βββ CustomizePromoController.cs
β βββ GeneralSettingsController.cs
β βββ OrganizeDiscoverLibraryController.cs
β βββ ImportDiscoverContentController.cs
β βββ ManageFavoriteRequestsController.cs
β βββ PluginConfigurationController.cs
β βββ SortDiscoverContentController.cs
β βββ TaskStatusController.cs
βββ JellyfinModels/ # Jellyfin Internal API wrapper models
β βββ DateTimeSerialization.cs
β βββ IJellyfinItem.cs
β βββ JellyfinILibraryManager.cs
β βββ JellyfinIProviderManager.cs
β βββ JellyfinIUserDataManager.cs
β βββ JellyfinIUserManager.cs
β βββ JellyfinMovie.cs
β βββ JellyfinSeries.cs
β βββ JellyfinTaskTrigger.cs
β βββ JellyfinUser.cs
β βββ JellyfinWrapperResult.cs
β βββ WrapperBase.cs
βββ JellyseerrModel/ # Generated API models
β βββ Api/ # API interface definitions
β βββ Common/ # Common models
β βββ Server/ # Server models
βββ Services/ # Business logic services
β βββ ApiService.cs
β βββ BridgeService.cs
β βββ CleanupService.cs
β βββ DiscoverService.cs
β βββ FavoriteService.cs
β βββ FavoriteEventHandler.cs
β βββ RefreshService.cs
β βββ MetadataService.cs
β βββ PlaceholderVideoGenerator.cs
β βββ PluginServiceRegistrator.cs
β βββ SortService.cs
β βββ SyncService.cs
βββ Tasks/ # Scheduled tasks
β βββ SortTask.cs
β βββ StartupTask.cs
β βββ SyncTask.cs
βββ Utils/ # Utility classes
β βββ DebugLogger.cs
β βββ FolderUtils.cs
β βββ JellyBridgeJsonSerializer.cs
βββ JellyBridge.csproj # Project file
βββ Plugin.cs # Main plugin class
manifest.json # Plugin manifest (in project root)