metadata

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: GPL-3.0 Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FallbackName added in v0.8.0

func FallbackName(game *storage.GameEntry) string

FallbackName returns a name for a library entry without metadata: the file name of its first disc, or its cartridge file, without the extension and anything from the first " (" on. Returns "" when the entry has no file.

func FormatReleaseDate added in v0.8.0

func FormatReleaseDate(date string) string

FormatReleaseDate formats a metadata release date for display: YYYY-MM-DD becomes "Month YYYY" and YYYY is returned as is. Any other value is returned unchanged.

Types

type MetadataManager

type MetadataManager struct {
	// contains filtered or unexported fields
}

MetadataManager holds the emulator's game metadata.

func NewMetadataManager

func NewMetadataManager(source content.MetadataSource) *MetadataManager

NewMetadataManager creates a metadata manager. When source is not nil, all of its game metadata is loaded once here; the map is read-only afterwards, so lookups are safe from any goroutine.

func (*MetadataManager) Game added in v0.8.0

func (m *MetadataManager) Game(gameID string) (content.GameMetadata, bool)

Game returns the metadata for a game ID and true, or false when the emulator has no entry for it.

func (*MetadataManager) Info added in v0.8.0

Info returns the keys a library entry is sorted and searched by: its title and its supported region codes in the order of its metadata regions, none when the core has no metadata for it.

func (*MetadataManager) Title added in v0.8.0

func (m *MetadataManager) Title(game *storage.GameEntry) string

Title returns the title to show for a library entry: the metadata title when there is one, else the entry's file name without its extension and parenthesized tags.

Jump to

Keyboard shortcuts

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