scanner

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RumbleListing

type RumbleListing struct {
	Exact  map[string]string // &->_ name -> original name (no suffix)
	ByNorm map[string]string // normalized name -> original name (no suffix)
}

RumbleListing holds the directory listing for a single variant's rumble CHT files. Exact maps the &->_ filename (without suffix) to the original filename. ByNorm maps normalized names for fallback matching.

type ScanPhase

type ScanPhase int

ScanPhase represents the current scanning phase

const (
	ScanPhaseInit ScanPhase = iota
	ScanPhaseDiscovery
	ScanPhaseArtwork
)

type ScanProgress

type ScanProgress struct {
	Phase           ScanPhase
	Progress        float64 // 0.0 to 1.0
	GamesFound      int
	ArtworkTotal    int
	ArtworkComplete int
	StatusText      string
}

ScanProgress represents progress updates from the scanner

type ScanResult

type ScanResult struct {
	NewGames  int
	Errors    []error
	Cancelled bool
}

ScanResult represents the final scan result

type Scanner

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

Scanner handles ROM scanning in the background

func NewScanner

func NewScanner(dirs []storage.ScanDirectory, excluded []string, existing map[string]*storage.GameEntry, rescanAll bool, extensions []string, md *metadata.MetadataManager, defaultConsoleID int) *Scanner

NewScanner creates a new scanner instance

func (*Scanner) Cancel

func (s *Scanner) Cancel()

Cancel signals the scanner to stop

func (*Scanner) Done

func (s *Scanner) Done() <-chan ScanResult

Done returns the done channel

func (*Scanner) Games

func (s *Scanner) Games() map[string]*storage.GameEntry

Games returns the discovered games

func (*Scanner) Progress

func (s *Scanner) Progress() <-chan ScanProgress

Progress returns the progress channel

func (*Scanner) Run

func (s *Scanner) Run()

Run starts the scanning process

type ThumbnailListing

type ThumbnailListing struct {
	// Maps keyed by artwork type ("Named_Boxarts", etc.)
	Exact  map[string]map[string]string       // artType -> exactKey -> original
	ByBase map[string]map[string][]thumbEntry // artType -> normBase -> candidates
}

ThumbnailListing holds the directory listing for a single variant's thumbnail repository. Each artwork type has indexed entries for fast lookup by base title.

Jump to

Keyboard shortcuts

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