media

package
v0.0.0-...-0df88b9 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CoverArtForPaths

func CoverArtForPaths(paths []string) [][]string

func IsAudioOrVideo

func IsAudioOrVideo(p string) bool

func IsImage

func IsImage(p string) bool

Types

type Metadata

type Metadata struct {
	Duration time.Duration
	MIMEType string
	Tags     map[string]string
	Title    string
}

func MetadataForPath

func MetadataForPath(p string) (*Metadata, error)

func (Metadata) Tag

func (m Metadata) Tag(key string) string

type MetadataCache

type MetadataCache interface {
	MetadataForPath(string) (*Metadata, error)
	MetadataForPaths([]string) []*Metadata
	Warm(string)
}

func NewMetadataCache

func NewMetadataCache() MetadataCache

type NoOpCache

type NoOpCache struct{}

func (NoOpCache) MetadataForPath

func (_ NoOpCache) MetadataForPath(p string) (*Metadata, error)

func (NoOpCache) MetadataForPaths

func (_ NoOpCache) MetadataForPaths(paths []string) []*Metadata

func (NoOpCache) Warm

func (_ NoOpCache) Warm(p string)

Jump to

Keyboard shortcuts

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