Documentation
¶
Overview ¶
Package session monitors live playback sessions on a Plex Media Server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Monitor polls a Plex Media Server for live playback sessions.
func NewMonitor ¶
NewMonitor creates a session monitor that polls client at interval.
Parameters:
- client: Plex client used to query the server.
- server: Plex Media Server to poll.
- interval: Time between session refreshes.
Returns:
- monitor: A monitor that has not been started.
func (*Monitor) GetSessions ¶
GetSessions returns a copy of the cached playback sessions.
Returns:
- sessions: A clone of the current session list.
func (*Monitor) Stop ¶
func (mon *Monitor) Stop()
Stop ends polling and waits for the poll goroutine to exit.
func (*Monitor) Unauthorized ¶ added in v0.4.0
Unauthorized reports whether the server refused the last poll's token.
Returns:
- refused: True until a poll succeeds again.
Click to show internal directories.
Click to hide internal directories.