Documentation
¶
Index ¶
- type MediaStats
- type SyncResult
- type SyncService
- func (s *SyncService) GetStats(ctx context.Context) (*MediaStats, error)
- func (s *SyncService) SyncAll(ctx context.Context, cleanup bool) ([]SyncResult, error)
- func (s *SyncService) SyncMovies(ctx context.Context, cleanup bool) (*SyncResult, error)
- func (s *SyncService) SyncSeries(ctx context.Context, cleanup bool) (*SyncResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MediaStats ¶
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
Click to show internal directories.
Click to hide internal directories.