media

package
v0.0.0-...-1bad096 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// GID is the processed files group to set
	GID int

	// UID is the processed files owner to set
	UID int

	// WD is the working directory's absolute path
	WD string
)

Functions

func List

func List(wd string, extensions []string, regExp *regexp.Regexp) []string

List lists files in directory with filter on extensions and RegExp

func ParseTitle

func ParseTitle(filename string) (*PTN.TorrentInfo, error)

ParseTitle returns parsed information from a file name

func ToEpisodeName

func ToEpisodeName(title string, season int, episode int, container string) string

ToEpisodeName returns formatted TV show episode name from given parameters

func ToMovieName

func ToMovieName(title string, year int, extension string) string

ToMovieName returns formatted movie name from given parameters

func ToSeasonName

func ToSeasonName(season int) string

ToSeasonName returns formatted season name from given parameter

Types

type Episode

type Episode struct {
	Basename  string
	Extension string
	Fullname  string
}

Episode holds information about an episode

type Movie

type Movie struct {
	Basename  string
	Extension string
	Fullname  string
	Title     string
	Year      int
}

Movie is the type of data that will be formatted as a movie

type Season

type Season struct {
	Name     string
	Episodes []Episode
}

Season holds information about a season

type TVShow

type TVShow struct {
	Name    string
	Seasons []Season
}

TVShow is the type of data that will be formatted as a TV show

Jump to

Keyboard shortcuts

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