Documentation
¶
Overview ¶
Package trackprefs persists viewer stream policy and show-specific choices.
Index ¶
- type Choice
- type Options
- type Rules
- type SavedChoice
- type Selection
- type Service
- func (s *Service) DeleteRules(ctx context.Context, user int64) error
- func (s *Service) Forget(ctx context.Context, user, show int64) error
- func (s *Service) GetRules(ctx context.Context, user int64) (Rules, error)
- func (s *Service) Handler() http.Handler
- func (s *Service) Memory(ctx context.Context, user int64) ([]SavedChoice, error)
- func (s *Service) PutRules(ctx context.Context, user int64, r Rules) error
- func (s *Service) Remember(ctx context.Context, user int64, key core.RatingKey, kind string, ...) error
- func (s *Service) Select(ctx context.Context, user int64, key core.RatingKey, info core.MediaInfo, ...) (Selection, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rules ¶
type Rules struct {
AudioLanguages []string `json:"audioLanguages"`
SubtitleLanguages []string `json:"subtitleLanguages"`
PreferOriginal bool `json:"preferOriginal"`
SubtitleMode string `json:"subtitleMode"` // off, forced-only, foreign-only, always
SubtitleStyle string `json:"subtitleStyle"` // normal, sdh, forced
Loudness bool `json:"loudness"`
NightMode bool `json:"nightMode"`
DialogueBoost bool `json:"dialogueBoost"`
}
User zero is the owner-configured fallback policy; positive IDs are overrides.
func (Rules) AudioFilters ¶
AudioFilters returns only known ffmpeg filters; arbitrary client strings never enter the command.
type SavedChoice ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) Handler ¶
Handler serves /{userID} and /{userID}/shows/{showID} (DELETE). Mount behind the admin owner's authentication and CSRF middleware.
Click to show internal directories.
Click to hide internal directories.