mediascanner

package
v2.6.1 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: 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 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