Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FallbackName ¶ added in v0.8.0
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
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
func (m *MetadataManager) Info(game *storage.GameEntry) storage.GameKeys
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.