Documentation
¶
Overview ¶
Package plexsync provides bidirectional library comparison between Prism and a configured Plex media server. It identifies movies that exist in one system but not the other, and supports importing Plex-only movies into Prism.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PrismMovie ¶
type PrismMovie struct {
ID string `json:"id"`
Title string `json:"title"`
Year int `json:"year"`
TmdbID int `json:"tmdb_id"`
Status string `json:"status"`
}
PrismMovie is a movie found only in Prism (not in Plex).
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service orchestrates the bidirectional Plex library sync.
func NewService ¶
NewService creates a new plexsync Service.
func (*Service) Import ¶
func (s *Service) Import(ctx context.Context, opts SyncImportOptions) (*SyncImportResult, error)
Import adds selected Plex movies to Prism.
type SyncImportOptions ¶
type SyncImportOptions struct {
TmdbIDs []int `json:"tmdb_ids"`
LibraryID string `json:"library_id"`
QualityProfileID string `json:"quality_profile_id"`
Monitored bool `json:"monitored"`
}
SyncImportOptions controls what gets imported from Plex.
type SyncImportResult ¶
type SyncImportResult struct {
Imported int `json:"imported"`
Skipped int `json:"skipped"`
Failed int `json:"failed"`
Errors []string `json:"errors"`
}
SyncImportResult reports what happened during import.
type SyncMovie ¶
type SyncMovie struct {
Title string `json:"title"`
Year int `json:"year"`
TmdbID int `json:"tmdb_id"`
}
SyncMovie is a movie found only in Plex (not in Prism).
type SyncPreview ¶
type SyncPreview struct {
PlexTotal int `json:"plex_total"`
InPlexOnly []SyncMovie `json:"in_plex_only"`
InPrismOnly []PrismMovie `json:"in_prism_only"`
AlreadySynced int `json:"already_synced"`
Unmatched int `json:"unmatched"`
}
SyncPreview summarises the library diff between Plex and Prism.