audiobooks

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal added in v1.9.1

func Equal(a, b *Audiobook) bool

func GetPersonsString

func GetPersonsString(persons []string) string

Types

type Audiobook

type Audiobook struct {
	Path        string                   `json:"path" toml:",omitempty"`
	Title       string                   `json:"title"`
	Subtitle    string                   `json:"subtitle" toml:",omitempty"`
	Authors     []string                 `json:"authors"`
	Description *description.Description `json:"description,omitempty" toml:",omitempty"`
	ReleaseDate *toml.LocalDate          `json:"releaseDate,omitempty" toml:",omitempty"`
	Genres      []Genre                  `json:"genres,omitempty" toml:",omitempty"`
	Series      *Series                  `json:"series,omitempty" toml:",omitempty"`
	Narrators   []string                 `json:"narrators" toml:",omitempty"`
	Tags        []string                 `json:"tags,omitempty" toml:",omitempty"`
	Duration    time.Duration            `json:"duration" toml:",omitempty"`
	FileSize    uint64                   `json:"fileSize" toml:",omitempty"`
	MIMEType    string                   `json:"mimeType" toml:",omitempty"`
}

Audiobook - representation of a book.

func NewBook

func NewBook(title string, desc *description.Description, authors []string, releaseDate *toml.LocalDate,
	genreList []Genre, series *Series) Audiobook

func (*Audiobook) GetAuthor

func (b *Audiobook) GetAuthor() string

func (*Audiobook) GetNarrator

func (b *Audiobook) GetNarrator() string

type Genre

type Genre uint8

Genre - representation of genres of books.

const (
	UndefinedGenre Genre = iota
	Literary
	Mystery
	Romance
	Comedy
	Childrens
	YoungAdult
	SciFi
	Fantasy
	NonFiction
	Biography
	Historical
	Thriller
	Horror
	LGBT
	Erotica
)

func ParseGenre

func ParseGenre(s string) (Genre, error)

Convert a string to a Genre, returns an error if the string is unknown.

func (Genre) MarshalText

func (g Genre) MarshalText() ([]byte, error)

func (Genre) String

func (g Genre) String() string

String allows Genre to implement fmt.Stringer.

func (*Genre) UnmarshalText

func (g *Genre) UnmarshalText(data []byte) (err error)

type Person

type Person string

Person - representation of a person, for example an author or audiobook narrator.

type Series

type Series struct {
	Sequence decimal.Decimal `json:"sequence"`
	Title    string          `json:"title"`
}

Series - representation of a series of books.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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