Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsJobRunning ¶
func IsJobRunning() bool
func ScheduleScanner ¶
func ScheduleScanner(cronStr string, movieScanner *MovieScanner, tvScanner *TVScanner)
Types ¶
type MediaUploader ¶
type MediaUploader struct {
// contains filtered or unexported fields
}
func NewMediaUploader ¶
func NewMediaUploader(tvSourceFolder, movieSourceFolder string) *MediaUploader
func (*MediaUploader) UploadMovie ¶
func (m *MediaUploader) UploadMovie(context *gin.Context, file *multipart.FileHeader) error
func (*MediaUploader) UploadTV ¶
func (m *MediaUploader) UploadTV(context *gin.Context, file *multipart.FileHeader) error
type MovieScanner ¶
type MovieScanner struct {
// contains filtered or unexported fields
}
MovieScanner represents a struct that scans movie folders to search for movie files and move them.
func NewMovieScanner ¶
func NewMovieScanner(source, destination string, mediaClient pkg.MediaClient, mediaRepository *repository.MediaRepository, objectStorage objectStorage.ObjectStorage) *MovieScanner
NewMovieScanner returns a new instance of MovieScanner with given source directory, target directory, and TMDB API key.
func (*MovieScanner) ScanMovies ¶
func (s *MovieScanner) ScanMovies() error
ScanMovies scans the source directory for movies and moves them to the destination directory. It returns a slice of MovieScannerResult and an error if there is any.
type MovieScannerResult ¶
type MovieScannerResult struct { Source string // Source filename. Movie pkg.Movie // Movie details returned by TMDB. }
MovieScannerResult represents a struct that holds the results of scanning and moving movie files.
type TVScanner ¶
type TVScanner struct {
// contains filtered or unexported fields
}
TVScanner represents a struct that scans TV show folders to search for TV show files and move them.
func NewTVScanner ¶
func NewTVScanner(source, destination string, mediaClient pkg.MediaClient, mediaRepository *repository.MediaRepository, objectStorage objectStorage.ObjectStorage) *TVScanner
NewTVScanner returns a new instance of TVScanner with given source directory, target directory, and TMDB API key.
type TVScannerResult ¶
type TVScannerResult struct { Source string // Source filename. TVEpisode pkg.TVEpisode // TV episode details returned by TMDB. }
TVScannerResult represents a struct that holds the results of scanning and moving TV show files.