media

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MediaStats

type MediaStats struct {
	Movies int64
	Series int64
	Anime  int64
	Total  int64
}

MediaStats contains media catalog statistics

type SyncResult

type SyncResult struct {
	Source   models.MediaSource
	Created  int
	Updated  int
	Deleted  int
	Errors   int
	Duration time.Duration
}

SyncResult contains the results of a sync operation

type SyncService

type SyncService struct {
	// contains filtered or unexported fields
}

SyncService handles media synchronization from Radarr/Sonarr

func NewSyncService

func NewSyncService(
	radarrClient *radarr.Client,
	sonarrClient *sonarr.Client,
	mediaRepo *repository.MediaRepository,
	logger *slog.Logger,
) *SyncService

NewSyncService creates a new SyncService

func (*SyncService) GetStats

func (s *SyncService) GetStats(ctx context.Context) (*MediaStats, error)

GetStats returns media statistics

func (*SyncService) SyncAll

func (s *SyncService) SyncAll(ctx context.Context, cleanup bool) ([]SyncResult, error)

SyncAll synchronizes all media from both Radarr and Sonarr

func (*SyncService) SyncMovies

func (s *SyncService) SyncMovies(ctx context.Context, cleanup bool) (*SyncResult, error)

SyncMovies synchronizes movies from Radarr

func (*SyncService) SyncSeries

func (s *SyncService) SyncSeries(ctx context.Context, cleanup bool) (*SyncResult, error)

SyncSeries synchronizes series from Sonarr

Jump to

Keyboard shortcuts

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