mediafile

package
v0.0.0-...-b267672 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMediaFile

func IsMediaFile(path string) bool

IsMediaFile indicates if a file has a valid media file extension

Types

type MediaFile

type MediaFile struct {
	Dir       string
	Filename  string
	Extension string
	// contains filtered or unexported fields
}

MediaFile represents a media file on disk

func NewMediaFile

func NewMediaFile(path string) (*MediaFile, error)

NewMediaFile creates a new MediaFile instance

func (*MediaFile) Delete

func (mediafile *MediaFile) Delete() error

Delete will remove the media file from disk

func (*MediaFile) DeleteWithSubtitleFiles

func (mediafile *MediaFile) DeleteWithSubtitleFiles() error

DeleteWithSubtitleFiles will remove the media file from disk along with all subtitle files

type ShowMapping

type ShowMapping struct {
	TraktName string
	TVDBID    int
	IMDBID    string
}

ShowMapping contain any mappings that need to be done for a show

type TVShowFile

type TVShowFile struct {
	MediaFile

	Show     string
	Season   int
	Episode  int
	Mappings ShowMapping
}

TVShowFile represents a tv show file on disk

func NewTVShowFile

func NewTVShowFile(path string, folderRegex string) (*TVShowFile, error)

NewTVShowFile creates a new MediaFile instance

Jump to

Keyboard shortcuts

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