parser

package
v0.0.0-...-2cec6bb Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtraMetadataFromPath

type ExtraMetadataFromPath struct {
	// Name of the extra
	Name string `validate:"required"`
	// Name of the artist of the extra
	ArtistName string `validate:"required"`
	// Index of the disc of the extra
	DiscIndex int `validate:"gte=0"`
	// Index of the track of the extra
	TrackIndex int `validate:"gte=0"`
	// Types of the extra
	Types    [](models.ExtraType)    `validate:"min=1"`
	Package_ PackageMetadataFromPath `validate:"required"`
}

Metadata Extracted from the path of an Extra file

type MediaChapter

type MediaChapter struct {
	Name      string               `validate:"required"`
	StartTime uint32               `validate:"required"`
	EndTime   uint32               `validate:"required"`
	Types     []models.ChapterType `validate:"required,dive,required"`
}

type MediaInfo

type MediaInfo struct {
	Quality  models.Quality `validate:"required"`
	Size     uint64         `validate:"required"`
	Duration uint64         `validate:"required"`
	Chapters []MediaChapter `validate:"required,dive"`
}

func GetMediaInfo

func GetMediaInfo(path string) (MediaInfo, error)

type MovieMetadataFromPath

type MovieMetadataFromPath struct {
	// Name of the movie
	Name string `validate:"required"`
	// Name of the artist of the movie
	ArtistName string `validate:"required"`
	// Type of movie
	Type_    models.MovieType        `validate:"required"`
	Package_ PackageMetadataFromPath `validate:"required"`
}

Metadata Extracted from the path of a Movie file

type PackageMetadataFromPath

type PackageMetadataFromPath struct {
	// Name of the package
	Name string `validate:"required"`
	// Name of the artist of the package
	// Optional
	ArtistName string
	// Release Year of the package
	ReleaseYear time.Time
}

Metadata Extracted from the path of a file

type PathMetadataParsingResult

type PathMetadataParsingResult struct {
	Movie *MovieMetadataFromPath
	Extra *ExtraMetadataFromPath
}

func ParseMetadataFromPath

func ParseMetadataFromPath(filePath string, userConfig *config.UserConfiguration) (PathMetadataParsingResult, error)

Jump to

Keyboard shortcuts

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