Documentation
¶
Overview ¶
Package spike serves a handful of local video files as a Plex library so the Plex front end (internal/plex) can be tested against official Plex apps before the Usenet engine exists. It implements core.Catalog and core.Playback over the files, plus in-memory State, Playlists, Collections, Recommender, Auth and a direct-play-only Transcoder.
Index ¶
- func ParseFileName(path string) (string, int)
- func ParseProbe(data []byte, ext string) (core.MediaInfo, error)
- type Library
- func (l *Library) Auth() core.Auth
- func (l *Library) Catalog() core.Catalog
- func (l *Library) Close() error
- func (l *Library) Collections() core.Collections
- func (l *Library) Deps() plex.Deps
- func (l *Library) Playback() core.Playback
- func (l *Library) Playlists() core.Playlists
- func (l *Library) Recommender() core.Recommender
- func (l *Library) State() core.State
- func (l *Library) Transcoder() core.Transcoder
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseFileName ¶
ParseFileName turns "The.Signal.1999.1080p.BluRay.x264.mkv" into ("The Signal", 1999).
Types ¶
type Library ¶
type Library struct {
// contains filtered or unexported fields
}
Library is the spike bundle.
func New ¶
New builds the library: every configured file is stat'ed and probed (ffprobe when on PATH, otherwise estimated). Missing files are skipped with a warning; it is an error if none remain.
func (*Library) Collections ¶
func (l *Library) Collections() core.Collections
func (*Library) Deps ¶
Deps returns a plex.Deps wired to the spike adapters, a movies-only section and the identity from the config.
func (*Library) Recommender ¶
func (l *Library) Recommender() core.Recommender
func (*Library) Transcoder ¶
func (l *Library) Transcoder() core.Transcoder
type Options ¶
type Options struct {
// Files overrides config.Spike.LocalFiles when non-empty.
Files []string
// Tokens accepted as the owner, in addition to config.Plex.Token.
Tokens []string
// AcceptAnyToken maps every non-empty token to the owner. For LAN
// testing with real Plex apps (whose per-device plex.tv tokens the spike
// cannot verify). Never enable on an exposed server.
AcceptAnyToken bool
// FFprobePath overrides config.Transcode.FFprobePath / PATH lookup.
FFprobePath string
// DisableProbe skips ffprobe and estimates media info (tests).
DisableProbe bool
// SessionIdle closes play sessions without activity (default 10 min).
SessionIdle time.Duration
Logger *slog.Logger
}
Options configure the spike library.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
ether-spike
command
Command ether-spike serves local video files through Ether's Plex front end, for testing official Plex apps (and pmsdiff) before the Usenet engine is wired in.
|
Command ether-spike serves local video files through Ether's Plex front end, for testing official Plex apps (and pmsdiff) before the Usenet engine is wired in. |