Documentation
¶
Index ¶
- func AddMediaPath(db database.MediaDBI, ss *database.ScanState, systemID string, path string) (titleIndex, mediaIndex int)
- func FindPath(path string) (string, error)
- func FlushScanStateMaps(ss *database.ScanState)
- func GetFiles(cfg *config.Instance, platform platforms.Platform, systemID string, ...) ([]string, error)
- func NewNamesIndex(platform platforms.Platform, cfg *config.Instance, systems []systemdefs.System, ...) (indexedFiles int, err error)
- func SeedKnownTags(db database.MediaDBI, ss *database.ScanState) error
- type IndexStatus
- type MediaPathFragments
- type PathResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddMediaPath ¶
func FlushScanStateMaps ¶
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.
Types ¶
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
Click to show internal directories.
Click to hide internal directories.