{"modulePath":"github.com/beacon-stack/pilot","version":"v0.1.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package plex\n\nPackage plex implements a Pilot media server plugin for Plex. On import\\_complete it triggers a library section refresh so the new movie appears immediately.\n\n## Types\n\n```go\ntype Config struct {\n\tURL           string `json:\"url\"`\n\tToken         string `json:\"token\"`\n\tSkipTLSVerify bool   `json:\"skip_tls_verify,omitempty\"`\n}\n```\nConfig holds the user-supplied settings for a Plex media server.\n\n```go\ntype Movie struct {\n\tRatingKey string `json:\"rating_key\"`\n\tTitle     string `json:\"title\"`\n\tYear      int    `json:\"year\"`\n\tTmdbID    int    `json:\"tmdb_id\"` // 0 if no TMDB guid found\n}\n```\nMovie represents a movie in a Plex library section.\n\n```go\ntype Section struct {\n\tKey   string `json:\"key\"`\n\tTitle string `json:\"title\"`\n\tType  string `json:\"type\"`\n}\n```\nSection is a public representation of a Plex library section.\n\n```go\ntype Server struct {\n\t// contains filtered or unexported fields\n}\n```\nServer is a Plex media server plugin instance.\n\n```go\nfunc New(cfg Config) *Server\n```\nNew creates a new Server from the given config.\n\n```go\nfunc (s *Server) ListMovies(ctx context.Context, sectionKey string) ([]Movie, error)\n```\nListMovies returns all movies in the given Plex library section.\n\n```go\nfunc (s *Server) ListSections(ctx context.Context) ([]Section, error)\n```\nListSections returns the movie library sections from this Plex server.\n\n```go\nfunc (s *Server) Name() string\n```\n\n```go\nfunc (s *Server) RefreshLibrary(ctx context.Context, moviePath string) error\n```\nRefreshLibrary triggers a refresh of the Plex library section that contains moviePath. If no matching section is found, it falls back to refreshing all movie sections.\n\n```go\nfunc (s *Server) Test(ctx context.Context) error\n```\nTest verifies that the Plex server is reachable with the configured token.\n\n```go\nfunc (s *Server) WatchHistory(ctx context.Context, since time.Time) ([]plugin.WatchEvent, error)\n```\nWatchHistory returns watch events since the given timestamp. Implements plugin.WatchProvider.\n\n","path":"github.com/beacon-stack/pilot/plugins/mediaservers/plex","name":"plex","synopsis":"Package plex implements a Pilot media server plugin for Plex.","isRedistributable":true}
