handlers

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseHandler

type BaseHandler struct {
	DryRun     bool
	QuickMode  bool
	MaxResults int
	// contains filtered or unexported fields
}

BaseHandler contient les éléments communs à tous les handlers

func NewBaseHandler

func NewBaseHandler(config *config.Config) BaseHandler

NewBaseHandler crée un nouveau BaseHandler avec la configuration donnée

type MediaHandler

type MediaHandler interface {
	// Handle traite une suggestion de média
	Handle(ctx context.Context) error
}

MediaHandler définit l'interface commune pour tous les handlers de médias

type MediaSuggestion

type MediaSuggestion interface {
	GetOriginalFilename() string
	GenerateFilename(pattern string) string
	HasSingleSuggestion() bool
	RenameFileManually(ctx context.Context) error
}

MediaSuggestion reste l'interface commune pour les suggestions

type MovieHandler

type MovieHandler struct {
	BaseHandler
	// contains filtered or unexported fields
}

func NewMovieHandler

func NewMovieHandler(
	base BaseHandler,
	suggestion mediarenamer.MovieSuggestions,
	movieClient mediadata.MovieClient,
	mediaRenamer *mediarenamer.MediaRenamer,
	exitFunc func() error,
) *MovieHandler

func (*MovieHandler) Handle

func (h *MovieHandler) Handle(ctx context.Context) error

type TvShowHandler

type TvShowHandler struct {
	BaseHandler
	// contains filtered or unexported fields
}

func NewTvShowHandler

func NewTvShowHandler(
	base BaseHandler,
	suggestions mediarenamer.EpisodeSuggestions,
	tvClient mediadata.TvShowClient,
	mediaRenamer *mediarenamer.MediaRenamer,
	exitFunc func() error,
) *TvShowHandler

func (*TvShowHandler) Handle

func (h *TvShowHandler) Handle(ctx context.Context) error

Jump to

Keyboard shortcuts

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