media

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: GPL-3.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	STEREO          = AudioFormat(-3)
	STEREO_PROBABLY = AudioFormat(-2)
	STEREO_MAYBE    = AudioFormat(-1)
	AUDIO_UNKNOWN   = AudioFormat(0)
	MULTI_MAYBE     = AudioFormat(1)
	MULTI_PROBABLY  = AudioFormat(2)
	MULTI           = AudioFormat(3)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioFormat

type AudioFormat int

func (AudioFormat) String

func (a AudioFormat) String() string

type File

type File struct {
	Path       string
	Name       string
	Subtitle   string
	Resolution Resolution
	// duration the tuner spent recording this file
	RecordedLength int
	// duration provided by epg
	Length int
	//
	// Probability values:
	//
	// > 0 MULTI, < 0 STEREO
	//
	// None in log: 0
	//
	// STEREO only in tuner: -3
	//
	// MULTI only in tuner: +3
	//
	// MULTI + STEREO in log, STEREO tag in meta: -2
	//
	// MULTI + STEREO in log, No Tag: +1
	//
	// MULTI + STEREO in log, MULTI tag in meta: +2
	//
	// Probability High: Only tuner
	//
	// Probability Med: tuner + tags
	//
	// Probability Low: tuner + meta without tag
	AudioFormat      AudioFormat
	Errors           int
	CustomParams     []string
	MetadataLog      []string
	TunerLog         []string
	LogPaths         []string
	AllowReplacement bool
	// contains filtered or unexported fields
}

func (*File) Legacy

func (f *File) Legacy() bool

Use to determine whether this file has a legacy logfile attached to it.

If this teturns true, the MetadataLog will be nil as it doesn't exist for legacy file types

func (*File) LengthDifference

func (f *File) LengthDifference() int

Returns, in percent from 0-100, the difference in length between the recorded and actual length

func (*File) LogsContain

func (f *File) LogsContain(terms []string) (bool, string)

LogsContain returns true once the first term matches.

It also includes the term that was matched against

func (*File) OutName

func (f *File) OutName() string

func (*File) Update

func (f *File) Update() error

Updates the struct to fill out all remaining fields

type Resolution

type Resolution struct {
	Tag   string
	Value string
}

func (*Resolution) GetPixels

func (r *Resolution) GetPixels() (int64, error)

Jump to

Keyboard shortcuts

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