plexcron

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const TrigPlexSessions common.TriggerName = "Gathering and sending Plex Sessions."

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

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

Action contains the exported methods for this package.

func New

func New(config *common.Config, plex *apps.PlexConfig) *Action

New configures the library.

func (*Action) Create added in v0.4.0

func (a *Action) Create()

Run initializes the library.

func (*Action) GetSessions

func (a *Action) GetSessions(ctx context.Context) (*plex.Sessions, error)

GetSessions returns the plex sessions up to 1 minute old. This uses a channel so concurrent requests are avoided.

func (*Action) Send

func (a *Action) Send(event website.EventType)

SendPlexSessions sends plex sessions in a go routine through a channel.

func (*Action) SendWebhook

func (a *Action) SendWebhook(hook *plex.IncomingWebhook)

SendWebhook is called in a go routine after a plex media.play webhook is received.

Jump to

Keyboard shortcuts

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