plexsync

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func NewService(ms *mediaserver.Service, movies *movie.Service, q dbgen.Querier) *Service

NewService creates a new plexsync Service.

func (*Service) Import

Import adds selected Plex movies to Prism.

func (*Service) Preview

func (s *Service) Preview(ctx context.Context, mediaServerID, sectionKey string) (*SyncPreview, error)

Preview fetches movies from a Plex section and compares against Prism's library.

func (*Service) Sections

func (s *Service) Sections(ctx context.Context, mediaServerID string) ([]plexpkg.Section, error)

Sections returns the movie library sections from a Plex media server.

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.

Jump to

Keyboard shortcuts

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