features

package
v0.0.0-...-ad0698c Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2023 License: MIT Imports: 14 Imported by: 0

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.

func (*TVScanner) ScanTV

func (s *TVScanner) ScanTV() error

ScanTV scans the source directory for TV shows and moves them to the destination directory. It returns a slice of TVScannerResult and an error if there is any.

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.

Jump to

Keyboard shortcuts

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