models

package
v0.0.0-...-e986615 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMediaFormatNotSupported = errors.New("media format not supported")
)

Functions

This section is empty.

Types

type Details

type Details struct {
	Name        string
	Director    string
	Genre       string
	Rating      float64
	MaxRating   float64
	ReleaseDate time.Time
	ImagePoster string
}

type Media

type Media struct {
	Name     string
	Format   MediaFormat
	FilePath string
	Size     int64
}

func (Media) Hash

func (m Media) Hash() string

type MediaFormat

type MediaFormat int
const (
	MediaFormatAvi MediaFormat = iota
	MediaFormatMkv
	MediaFormatFlac
	MediaFormatMp4
	MediaFormatMp4a
	MediaFormatMp3
	MediaFormatOgv
	MediaFormatOgm
	MediaFormatOgg
	MediaFormatOga
	MediaFormatOpus
	MediaFormatWebm
	MediaFormatWav
)

func MediaFormatFrom

func MediaFormatFrom(raw string) (MediaFormat, error)

func (MediaFormat) Extension

func (d MediaFormat) Extension() string

func (MediaFormat) Name

func (d MediaFormat) Name() string

Jump to

Keyboard shortcuts

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