mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #14813] [CLOSED] replace command line parser with system one #14128
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/14813
Author: @ibizaman
Created: 9/17/2025
Status: ❌ Closed
Base:
master← Head:cli_parser📝 Commits (1)
d1d5335replace command line parser with system one📊 Changes
7 files changed (+201 additions, -47 deletions)
View changed files
📝
Directory.Packages.props(+1 -1)📝
Jellyfin.Server/Jellyfin.Server.csproj(+1 -1)➕
Jellyfin.Server/Options.cs(+44 -0)📝
Jellyfin.Server/Program.cs(+9 -9)📝
Jellyfin.Server/StartupOptions.cs(+137 -35)📝
src/Jellyfin.Networking/Jellyfin.Networking.csproj(+4 -0)📝
tests/Jellyfin.Server.Integration.Tests/JellyfinApplicationFactory.cs(+5 -1)📄 Description
This PR breaks down the effort started in https://github.com/jellyfin/jellyfin/pull/14422
It is the first step as outlined here, namely:
Changes
Ran
dotnet add package System.CommandLine --prereleaseto get the package.What I like about this change, on top of the nicer help output, is we got rid of the setters which were superfluous in the first place.
Also, the reflection used allows us to add command line argument fields and properties without forgetting to actually add them to the
Commandinstance.I took the liberty to silence warnings about the placement of the fields and methods as I find it much more logical to group them by argument name.
Help before:
Help now:
Help with wrong argument before:
Help with wrong argument now:
Sanity check run:
Issues
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.