Documentation
¶
Overview ¶
Package webclient provides the official Jellyfin Web build that the native Jellyfin apps (Android, iOS/iPadOS, Desktop, webOS, Xbox) load from <server>/web/. Nothing is bundled: the pinned .deb is downloaded from repo.jellyfin.org when Jellyfin is turned on and cached under the data directory.
Index ¶
- Constants
- func AdaptSubtitles(name string, raw []byte) ([]byte, error)
- func Extract(r io.ReaderAt, dstDir string) error
- func ServeVela(w http.ResponseWriter, r *http.Request, dir string)
- func ServeVelaBrand(w http.ResponseWriter, r *http.Request, dir, appName string)
- func ServeVelaWithBrand(w http.ResponseWriter, r *http.Request, dir string, brand VelaBrand)
- func SubtitleAdapterAsset(name string) bool
- func VelaReady(dir string) bool
- type Installer
- type Status
- type VelaBrand
- type VelaIconAsset
Constants ¶
const ( Version = "12.4" URL = "https://repo.jellyfin.org/files/server/debian/stable/v12.4/amd64/jellyfin-web_12.4%2Bdeb13_all.deb" SHA256 = "30561fda7e4ec2f48cfc86119b7bdf7f9fe319ebdc22069a5096ba4999198b64" Size = 32062514 )
Pinned artifact. One place, so an upgrade is a single edit. The URL is the stable Debian pool path; repo.jellyfin.org redirects it to a mirror, so the downloader must follow redirects (HTTPS only).
Variables ¶
This section is empty.
Functions ¶
func AdaptSubtitles ¶
AdaptSubtitles adds an explicit progressive-text capability and a reader for it to the pinned client. Changes are made in memory, leaving the verified upstream install intact. Exact anchors fail closed on an upstream upgrade.
func Extract ¶
Extract unpacks the Jellyfin Web files from a .deb read at the start of r into dstDir. It reads only the "data.tar.xz" member and refuses anything outside the web prefix. dstDir must already exist.
func ServeVela ¶
func ServeVela(w http.ResponseWriter, r *http.Request, dir string)
ServeVela serves the installed build with SPA deep-link fallback and default branding.
func ServeVelaBrand ¶
func ServeVelaBrand(w http.ResponseWriter, r *http.Request, dir, appName string)
ServeVelaBrand serves the installed build with SPA deep-link fallback, patching the root HTML <title> and web manifest name/short_name when appName is set.
func ServeVelaWithBrand ¶
ServeVelaWithBrand serves the installed Vela build with dynamic branding for index.html, manifest.webmanifest, and PWA/favicon icons.
func SubtitleAdapterAsset ¶
Types ¶
type Installer ¶
type Installer struct {
// Dir is the install root: Dir/Version holds the extracted files, and a
// ".complete" marker beside it records the verified version and sha.
Dir string
// HTTP downloads the artifact. It should go through Ether's egress when a
// client is available to the caller; nil falls back to a plain client.
HTTP *http.Client
// Overridable in tests; they default to the pinned constants.
URL string
SHA256 string
Size int64
// contains filtered or unexported fields
}
Installer fetches, verifies and caches the pinned Jellyfin Web build. The zero value is unusable; construct with New.
func New ¶
VerifyState proves the pinned artifact is trustworthy and reports whether a file's sha256 matches. It is used by the extractor and by tests.
func (*Installer) Begin ¶
Begin starts the first install in the background if none is present or running, and reports the current state. It never blocks on the download, so a request handler can answer a "preparing" page while it runs. Concurrent calls share one download.
type VelaBrand ¶
type VelaBrand struct {
AppName string
IconVersion string
IconIsSVG bool
IconAsset func(name string) (VelaIconAsset, bool)
RedirectPrefix string
}
VelaBrand carries the owner's optional Vela app name and icon resolver for dynamic index.html, manifest.webmanifest, and PWA icon serving.