Documentation
¶
Overview ¶
Package mediabrowser implements profile-driven Jellyfin and Emby probes.
Index ¶
- func RequestedDelivery(profile string, offer PlaybackOffer) (string, error)
- type PlaybackOffer
- type Probe
- type Profile
- type Protocol
- func (p *Protocol) Clients() map[string]conform.Client
- func (p *Protocol) Compare(a, b conform.Response) conform.Report
- func (p *Protocol) CompareRequest(req conform.Request, reference, target conform.Response) conform.Report
- func (p *Protocol) Corpus(profile string) []conform.Request
- func (p *Protocol) Discover(ctx context.Context, c *http.Client, base, token, profile string, ...) conform.DiscoveredIDs
- func (p *Protocol) Fetch(ctx context.Context, c *http.Client, base, token string, r conform.Request, ...) (conform.Response, error)
- func (p *Protocol) FixtureName(profile string, r conform.Request, jsonMode bool) string
- func (p *Protocol) Formats() []bool
- func (p *Protocol) IgnorePaths() []string
- func (p *Protocol) LoadCapturedBindings(dir, profile string) error
- func (*Protocol) Observe(request conform.Request, response conform.Response, vars map[string]string)
- func (p *Protocol) Redact(r conform.Response) conform.Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequestedDelivery ¶
func RequestedDelivery(profile string, offer PlaybackOffer) (string, error)
RequestedDelivery models the documented source-derived VOD behavior for the concrete configurations in deviceprofiles. Unknown clients and missing compatible paths fail closed; server decisions must be verified separately.
Types ¶
type PlaybackOffer ¶
type PlaybackOffer struct {
ID string `json:"Id"`
Protocol string `json:"Protocol"`
Path string `json:"Path"`
IsRemote bool `json:"IsRemote"`
SupportsDirectPlay bool `json:"SupportsDirectPlay"`
SupportsDirectStream bool `json:"SupportsDirectStream"`
SupportsTranscoding bool `json:"SupportsTranscoding"`
TranscodingURL string `json:"TranscodingUrl"`
}
PlaybackOffer contains only the fields used by audited client selection. It describes a requested delivery, not proof of the server's actual encode.
type Probe ¶
type Probe struct {
Name string `json:"name"`
Method string `json:"method"`
Path string `json:"path"`
Headers map[string]string `json:"headers"`
Body json.RawMessage `json:"body,omitempty"`
BodyBase64 string `json:"body_base64,omitempty"`
RangeKind string `json:"range_kind,omitempty"`
Binary bool `json:"binary,omitempty"`
FixtureOnly bool `json:"fixture_only,omitempty"`
ExpectedStatus int `json:"expected_status,omitempty"`
}
type Protocol ¶
type Protocol struct {
Dialect string
// contains filtered or unexported fields
}
func (*Protocol) CompareRequest ¶
func (p *Protocol) CompareRequest(req conform.Request, reference, target conform.Response) conform.Report
CompareRequest treats the target's extra ETag on direct range streams as informational. Ether uses that validator for correct If-Range resumption.
func (*Protocol) Discover ¶
func (p *Protocol) Discover(ctx context.Context, c *http.Client, base, token, profile string, align *conform.DiscoveredIDs) conform.DiscoveredIDs
func (*Protocol) FixtureName ¶
func (*Protocol) IgnorePaths ¶
func (*Protocol) LoadCapturedBindings ¶
LoadCapturedBindings must be called before discovery. The fixture directory is explicitly selected by the harness, never guessed from a working directory. Only successful, complete responses attached to this profile's exact requests contribute evidence. Missing fixtures remain errors, not fallback identities.
func (*Protocol) Observe ¶
func (*Protocol) Observe(request conform.Request, response conform.Response, vars map[string]string)
Observe carries the most recent successful playback negotiation into the subsequent stream and timeline probes for this profile. Failed negotiations clear old IDs so a stale session is never mistaken for the new one.