plexguid

package
v0.2.50 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2026 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package plexguid maps verified external identities through Plex's metadata provider. It never invents plex:// IDs or grants Plex account entitlements.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	HTTP       *http.Client
	BaseURL    string
	Token      func() string
	Background bool
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(db *sql.DB, o Options) *Service

func (*Service) Cached

func (s *Service) Cached(ctx context.Context, k core.RatingKey) string

Cached is safe for lists: no network requests or credentials are needed.

func (*Service) CachedMany

func (s *Service) CachedMany(ctx context.Context, keys []core.RatingKey) map[core.RatingKey]string

CachedMany batch-loads cached non-empty plex:// GUIDs for keys without network activity.

func (*Service) Close

func (s *Service) Close()

func (*Service) Lookup added in v0.2.45

func (s *Service) Lookup(ctx context.Context, guid string) (core.RatingKey, error)

Lookup reverses a verified Plex movie/show identity. It returns an identity, not a visibility decision: callers must load and authorize the title. A cold lookup accepts only an exact provider GUID with one TMDB identity.

func (*Service) Resolve

func (s *Service) Resolve(ctx context.Context, k core.RatingKey) (string, error)

func (*Service) Schedule

func (s *Service) Schedule(keys ...core.RatingKey)

Schedule queues keys for asynchronous plex:// GUID resolution when Background is enabled. Safe to call on hot render paths.

func (*Service) Wait

func (s *Service) Wait()

Wait blocks until all queued background GUID resolutions finish.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL