gamelist

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Game

type Game struct {
	XMLName xml.Name `xml:"game" exhaustruct:"optional"`

	Path string `xml:"path"`
	Name string `xml:"name"`
	Desc string `xml:"desc"`

	Image       string  `xml:"image,omitempty" exhaustruct:"optional"`
	Thumbnail   string  `xml:"thumbnail,omitempty" exhaustruct:"optional"`
	Rating      float32 `xml:"rating,omitempty" exhaustruct:"optional"`
	ReleaseDate string  `xml:"releasedate,omitempty" exhaustruct:"optional"`
	Developer   string  `xml:"developer,omitempty" exhaustruct:"optional"`
	Publisher   string  `xml:"publisher,omitempty" exhaustruct:"optional"`
	Genre       string  `xml:"genre,omitempty" exhaustruct:"optional"`
	Players     string  `xml:"players,omitempty" exhaustruct:"optional"`
	PlayCount   int     `xml:"playcount,omitempty" exhaustruct:"optional"`
	Lastplayed  string  `xml:"lastplayed,omitempty" exhaustruct:"optional"`

	// Miyoo Mini/OnionOS Extensions
	Hash    string `xml:"hash,omitempty" exhaustruct:"optional"`
	GenreID int    `xml:"genreid,omitempty" exhaustruct:"optional"`
	ID      int    `xml:"id,attr,omitempty" exhaustruct:"optional"`
	Source  string `xml:"source,attr,omitempty" exhaustruct:"optional"`
}

func NewGame added in v1.1.0

func NewGame(name, path, desc string) Game

func (*Game) AddImage added in v1.1.0

func (g *Game) AddImage(romsDir string) error

type GameList

type GameList struct {
	XMLName xml.Name `xml:"gameList" exhaustruct:"optional"`

	Provider Provider `xml:"provider,omitempty" exhaustruct:"optional"`
	Games    []Game   `xml:"game"`
}

func Load added in v1.1.0

func Load(r io.Reader) (*GameList, error)

Load takes an io.Reader and returns a GameList.

func NewGameList added in v1.1.0

func NewGameList() *GameList

NewGameList returns a new empty &GameList.

func (*GameList) AddGame added in v1.1.0

func (g *GameList) AddGame(path string) error

func (*GameList) Write added in v1.1.0

func (g *GameList) Write(writer io.Writer) error

Write takes an io.Writer and writes the GameList to it.

type Provider added in v1.1.0

type Provider struct {
	XMLName xml.Name `xml:"provider" exhaustruct:"optional"`

	System   string `xml:"System,omitempty" exhaustruct:"optional"`
	Software string `xml:"software,omitempty" exhaustruct:"optional"`
	Database string `xml:"database,omitempty" exhaustruct:"optional"`
	Web      string `xml:"web,omitempty" exhaustruct:"optional"`
}

Jump to

Keyboard shortcuts

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