Documentation
¶
Index ¶
- type ActiveSession
- type AudioCheckCmd
- type AudioInfo
- type ClientContext
- type DirectorItem
- type DirectorsCmd
- type DuplicateGroup
- type DuplicatesCmd
- type EditionInfo
- type EditionsCmd
- type EpisodeGap
- type EpisodeListItem
- type EpisodeStreamResult
- type EpisodesListCmd
- type EpisodesMissingCmd
- type FilePathInfo
- type FilePathsCmd
- type HistoryItem
- type MatchApplyCmd
- type MatchCmd
- type MatchSearchCmd
- type MetadataInfo
- type MetadataMissingCmd
- type MovieItem
- type MoviesCmd
- type PlaylistAddCmd
- type PlaylistAddResult
- type PlaylistCmd
- type PlaylistCreateCmd
- type PlaylistCreateResult
- type PlaylistDeleteCmd
- type PlaylistDeleteResult
- type PlaylistListCmd
- type PlaylistListItem
- type PlaylistShowCmd
- type PlaylistShowItem
- type PlaylistSmartCmd
- type QualityCheckCmd
- type QualityInfo
- type RecentlyAddedCmd
- type RecentlyAddedItem
- type RecentlyWatchedCmd
- type RecentlyWatchedItem
- type SearchCmd
- type SearchItem
- type StreamInfo
- type StreamsCmd
- type StreamsListCmd
- type StreamsSetCmd
- type SubtitleInfo
- type SubtitlesMissingCmd
- type UnwatchedCmd
- type UnwatchedItem
- type WatchCmd
- type WatchHistoryCmd
- type WatchNowCmd
- type WatchStat
- type WatchStatsCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveSession ¶
type AudioCheckCmd ¶
type AudioCheckCmd struct {
Codecs string `help:"Comma-separated list of audio codecs to check (e.g., aac,ac3,dts)" default:""`
MinChannels int `help:"Minimum number of audio channels" default:"2"`
Section string `help:"Library section ID to scan (empty = all sections)" default:""`
Type string `help:"Filter by type: movie, episode, or all" default:"all" enum:"movie,episode,all"`
Limit int `help:"Maximum number of items to display" default:"0"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
type ClientContext ¶
type ClientContext struct {
Client *plexclient.Client
Ctx context.Context
Cancel context.CancelFunc
Timeout time.Duration
}
ClientContext holds the authenticated client and context for command execution.
func NewClientContext ¶
func NewClientContext(cfg *config.Config) (*ClientContext, error)
NewClientContext validates config, authenticates, and creates a Plex client. Caller must call ctx.Cancel() when done.
type DirectorItem ¶
type DirectorsCmd ¶
type DirectorsCmd struct {
Section string `help:"Library section ID (required)" short:"s" required:""`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
DirectorsCmd lists all directors in a library
type DuplicateGroup ¶
type DuplicateGroup struct {
Key string `json:"key"`
Title string `json:"title"`
Year int `json:"year,omitempty"`
Show string `json:"show,omitempty"`
Edition string `json:"edition,omitempty"`
Type string `json:"type"`
Count int `json:"count"`
RatingKeys []string `json:"rating_keys"`
}
DuplicateGroup represents a group of duplicate items
type DuplicatesCmd ¶
type DuplicatesCmd struct {
SectionID string `help:"Library section ID to scan (empty = all sections)" default:""`
Type string `help:"Filter by type: movie, episode, or all" default:"all" enum:"movie,episode,all"`
MinCount int `help:"Minimum number of duplicates to report" default:"2"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
EditionsAreDuplicates bool `help:"Treat different editions (Director's Cut, etc.) as duplicates" default:"false"`
}
DuplicatesCmd represents the duplicates command
type EditionInfo ¶
type EditionInfo struct {
Title string `json:"title"`
Year int `json:"year,omitempty"`
RatingKey string `json:"rating_key"`
Section string `json:"section"`
EditionTitle string `json:"edition_title,omitempty"`
FileEdition string `json:"file_edition,omitempty"`
RawEditionTag string `json:"raw_edition_tag,omitempty"`
FilePath string `json:"file_path"`
HasMetaEdition bool `json:"has_meta_edition"`
HasFileEdition bool `json:"has_file_edition"`
EditionMismatch bool `json:"edition_mismatch,omitempty"`
Issue string `json:"issue,omitempty"`
}
type EditionsCmd ¶
type EditionsCmd struct {
Section string `help:"Library section ID to check" short:"s"`
Title string `help:"Filter by title" short:"t"`
Issues bool `help:"Only show items with edition issues" short:"i"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
type EpisodeGap ¶
type EpisodeListItem ¶
type EpisodeStreamResult ¶
type EpisodesListCmd ¶
type EpisodesListCmd struct {
Show string `arg:"" help:"Show name to search for"`
Filter string `help:"Filter episodes by S##E## patterns (comma-separated, e.g., 'S1E1,S1E3,S2E5')" default:""`
KeysOnly bool `help:"Output only rating keys (space-separated, for piping to playlist create)" default:"false"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
type EpisodesMissingCmd ¶
type FilePathInfo ¶
type FilePathsCmd ¶
type FilePathsCmd struct {
Title string `name:"title" help:"Filter by title (substring match)"`
Section string `name:"section" help:"Filter by library section ID"`
Limit int `help:"Maximum number of items to display" default:"0"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
type HistoryItem ¶
type MatchApplyCmd ¶
type MatchCmd ¶
type MatchCmd struct {
Search MatchSearchCmd `cmd:"" help:"Search for metadata matches for an item"`
Apply MatchApplyCmd `cmd:"" help:"Apply a metadata match to an item"`
}
type MatchSearchCmd ¶
type MatchSearchCmd struct {
RatingKey string `arg:"" help:"Rating key of the item to search matches for"`
Title string `help:"Override title for search" short:"t"`
Year int `help:"Override year for search" short:"y"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
type MetadataInfo ¶
type MetadataMissingCmd ¶
type MetadataMissingCmd struct {
Section string `help:"Library section ID to scan (empty = all sections)" default:""`
Type string `help:"Filter by type: movie, episode, or all" default:"all" enum:"movie,episode,all"`
Limit int `help:"Maximum number of items to display" default:"0"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
type MoviesCmd ¶
type MoviesCmd struct {
Director string `help:"Filter by director name (case-insensitive, partial match)" short:"d"`
Section string `help:"Library section ID (required)" short:"s" required:""`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
MoviesCmd lists movies with optional filtering
type PlaylistAddCmd ¶
type PlaylistAddCmd struct {
Playlist string `arg:"" help:"Playlist ID (rating key)"`
Items []string `arg:"" help:"Rating keys to add"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
PlaylistAddCmd adds items to a playlist
type PlaylistAddResult ¶
type PlaylistCmd ¶
type PlaylistCmd struct {
List PlaylistListCmd `cmd:"" help:"List all playlists"`
Create PlaylistCreateCmd `cmd:"" help:"Create a new playlist"`
Smart PlaylistSmartCmd `cmd:"" help:"Create a smart playlist (auto-updates)"`
Add PlaylistAddCmd `cmd:"" help:"Add items to a playlist"`
Show PlaylistShowCmd `cmd:"" help:"Show items in a playlist"`
Delete PlaylistDeleteCmd `cmd:"" help:"Delete a playlist"`
}
PlaylistCmd is the parent command for playlist subcommands
type PlaylistCreateCmd ¶
type PlaylistCreateCmd struct {
Name string `arg:"" help:"Playlist name"`
Items []string `arg:"" help:"Rating keys to add (at least one required)"`
Type string `help:"Playlist type: video, audio, photo" default:"video" enum:"video,audio,photo"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
PlaylistCreateCmd creates a new playlist
type PlaylistCreateResult ¶
type PlaylistDeleteCmd ¶
type PlaylistDeleteCmd struct {
Playlist string `arg:"" help:"Playlist ID (rating key)"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
PlaylistDeleteCmd deletes a playlist
type PlaylistDeleteResult ¶
type PlaylistListCmd ¶
type PlaylistListCmd struct {
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
PlaylistListCmd lists all playlists
type PlaylistListItem ¶
type PlaylistShowCmd ¶
type PlaylistShowCmd struct {
Playlist string `arg:"" help:"Playlist ID (rating key)"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
PlaylistShowCmd shows items in a playlist
type PlaylistShowItem ¶
type PlaylistSmartCmd ¶
type PlaylistSmartCmd struct {
Name string `arg:"" help:"Playlist name"`
Section string `help:"Library section ID" short:"s" required:""`
Director string `help:"Filter by director name" short:"d"`
Type string `help:"Playlist type: video, audio" default:"video" enum:"video,audio"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
PlaylistSmartCmd creates a smart playlist
type QualityCheckCmd ¶
type QualityCheckCmd struct {
MinResolution string `help:"Minimum resolution filter (720p, 1080p, 4k)" default:"1080p" enum:"720p,1080p,4k"`
HDR bool `help:"Only show HDR content"`
Section string `help:"Library section ID to scan (empty = all sections)" default:""`
Type string `help:"Filter by type: movie, episode, or all" default:"all" enum:"movie,episode,all"`
Limit int `help:"Maximum number of items to display" default:"0"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
type QualityInfo ¶
type RecentlyAddedCmd ¶
type RecentlyAddedCmd struct {
Limit int `help:"Maximum number of items to show" default:"50"`
Days int `help:"Only show items added in the last N days" default:"7"`
Type string `help:"Filter by type: movie, episode, or all" default:"all" enum:"movie,episode,all"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
type RecentlyAddedItem ¶
type RecentlyWatchedCmd ¶
type RecentlyWatchedCmd struct {
Section string `help:"Filter by library section ID" default:""`
Type string `help:"Filter by type: movie, tv, or all" default:"all" enum:"movie,tv,all"`
Limit int `help:"Maximum number of items to show" default:"50"`
Days int `help:"Filter items watched within the last N days (0 = no filter)" default:"0"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
type RecentlyWatchedItem ¶
type SearchCmd ¶
type SearchCmd struct {
Query string `arg:"" help:"Search query"`
Section string `help:"Filter by library section ID" default:""`
Type string `` /* 136-byte string literal not displayed */
Limit int `help:"Maximum number of results" default:"50"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
type SearchItem ¶
type StreamInfo ¶
type StreamInfo struct {
ID int `json:"id"`
StreamType string `json:"stream_type"`
Language string `json:"language"`
LanguageCode string `json:"language_code"`
Codec string `json:"codec"`
Title string `json:"title,omitempty"`
Channels int `json:"channels,omitempty"`
Selected bool `json:"selected"`
Default bool `json:"default"`
}
type StreamsCmd ¶
type StreamsCmd struct {
List StreamsListCmd `cmd:"" help:"List available audio and subtitle streams for an item"`
Set StreamsSetCmd `cmd:"" help:"Set default audio and/or subtitle streams for episodes"`
}
type StreamsListCmd ¶
type StreamsSetCmd ¶
type StreamsSetCmd struct {
Show string `arg:"" help:"Show name or rating key"`
Season int `help:"Season number (required)" short:"s" required:""`
Audio string `help:"Audio stream to select (by language code, e.g., 'eng', 'jpn')" short:"a"`
Subtitle string `help:"Subtitle stream to select (by language code, e.g., 'eng', 'off')" short:"t"`
DryRun bool `help:"Show what would be changed without making changes" short:"n"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
type SubtitleInfo ¶
type SubtitlesMissingCmd ¶
type SubtitlesMissingCmd struct {
Lang string `help:"Comma-separated list of language codes to check (e.g., en,de,fr)" required:"true"`
Section string `help:"Library section ID to scan (empty = all sections)" default:""`
Type string `help:"Filter by type: movie, episode, or all" default:"all" enum:"movie,episode,all"`
Limit int `help:"Maximum number of items to display" default:"0"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
type UnwatchedCmd ¶
type UnwatchedCmd struct {
Type string `help:"Filter by type: movie, episode, or all" default:"all" enum:"movie,episode,all"`
Section string `help:"Filter by library section ID" default:""`
Limit int `help:"Maximum number of items to display" default:"50"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
type UnwatchedItem ¶
type WatchCmd ¶
type WatchCmd struct {
Now WatchNowCmd `cmd:"" help:"Show what's currently being watched"`
History WatchHistoryCmd `cmd:"" help:"Show watch history"`
Stats WatchStatsCmd `cmd:"" help:"Show watch statistics (most watched, by user, etc.)"`
}
type WatchHistoryCmd ¶
type WatchHistoryCmd struct {
Limit int `help:"Maximum number of items to show" default:"50"`
Days int `help:"Only show items from the last N days" default:"30"`
User string `help:"Filter by user name" short:"u"`
Type string `help:"Filter by type: movie, episode, or all" default:"all" enum:"movie,episode,all"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
WatchHistoryCmd shows watch history
type WatchNowCmd ¶
type WatchNowCmd struct {
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
WatchNowCmd shows current active sessions
type WatchStatsCmd ¶
type WatchStatsCmd struct {
Days int `help:"Analyze items from the last N days" default:"30"`
Top int `help:"Number of top items to show" default:"10"`
By string `help:"Group by: title, user, show" default:"title" enum:"title,user,show"`
Type string `help:"Filter by type: movie, episode, or all" default:"all" enum:"movie,episode,all"`
Output string `help:"Output format: table, json, or tsv" default:"table" enum:"table,json,tsv"`
}
WatchStatsCmd shows watch statistics