genres

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ALT_GENRES_XML = `` /* 39131-byte string literal not displayed */
View Source
const GENRES_XML = `` /* 72317-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type Genre

type Genre struct {
	Value        string      `xml:"value,attr"`
	Descriptions []RootDescr `xml:"root-descr"`
	Subgenres    []Subgenre  `xml:"subgenres>subgenre"`
}

type GenreAlt

type GenreAlt struct {
	Value  string `xml:"value,attr"`
	Format string `xml:"format,attr"`
}

type GenreDescr

type GenreDescr struct {
	Lang  string `xml:"lang,attr"`
	Title string `xml:"title,attr"`
}

type GenresTree

type GenresTree struct {
	XMLName xml.Name `xml:"fbgenrestransfer"`
	Genres  []Genre  `xml:"genre"`
}

func NewGenresTree

func NewGenresTree(treeFile string) *GenresTree

func (*GenresTree) GenreName

func (gt *GenresTree) GenreName(genre, lang string) string

func (*GenresTree) ListGenres

func (gt *GenresTree) ListGenres() []Genre

func (*GenresTree) ListSubGenres

func (gt *GenresTree) ListSubGenres(genre string) []Subgenre

func (*GenresTree) String

func (gt *GenresTree) String() string

func (*GenresTree) SubgenreName

func (gt *GenresTree) SubgenreName(sg *Subgenre, lang string) string

func (*GenresTree) Transfer

func (gt *GenresTree) Transfer(genre string) string

type RootDescr

type RootDescr struct {
	Lang     string `xml:"lang,attr"`
	Title    string `xml:"genre-title,attr"`
	Detailed string `xml:"detailed,attr"`
}

type Subgenre

type Subgenre struct {
	Value        string       `xml:"value,attr"`
	Descriptions []GenreDescr `xml:"genre-descr"`
	Alts         []GenreAlt   `xml:"genre-alt"`
}

Jump to

Keyboard shortcuts

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