mediascanner

package
v2.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMediaPath

func AddMediaPath(
	db database.MediaDBI,
	ss *database.ScanState,
	systemID string,
	path string,
) (titleIndex, mediaIndex int)

func FindPath

func FindPath(path string) (string, error)

FindPath case-insensitively finds a file/folder at a path.

func FlushScanStateMaps

func FlushScanStateMaps(ss *database.ScanState)

func GetFiles

func GetFiles(
	cfg *config.Instance,
	platform platforms.Platform,
	systemID string,
	path string,
) ([]string, error)

GetFiles searches for all valid games in a given path and returns a list of files. This function deep searches .zip files and handles symlinks at all levels.

func NewNamesIndex

func NewNamesIndex(
	platform platforms.Platform,
	cfg *config.Instance,
	systems []systemdefs.System,
	fdb *database.Database,
	update func(IndexStatus),
) (indexedFiles int, err error)

NewNamesIndex takes a list of systems, indexes all valid game files on disk and writes a name index to the DB.

Overwrites any existing names index but does not clean up old missing files.

Takes a function which will be called with the current status of the index during key steps.

Returns the total number of files indexed.

func SeedKnownTags

func SeedKnownTags(db database.MediaDBI, ss *database.ScanState) error

Types

type IndexStatus

type IndexStatus struct {
	SystemID string
	Total    int
	Step     int
	Files    int
}

type MediaPathFragments

type MediaPathFragments struct {
	Path     string
	FileName string
	Title    string
	Slug     string
	Ext      string
	Tags     []string
}

func GetPathFragments

func GetPathFragments(path string) MediaPathFragments

type PathResult

type PathResult struct {
	Path   string
	System systemdefs.System
}

func GetSystemPaths

func GetSystemPaths(
	_ *config.Instance,
	_ platforms.Platform,
	rootFolders []string,
	systems []systemdefs.System,
) []PathResult

Jump to

Keyboard shortcuts

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