pub struct ScanOptions {
pub force_read: bool,
pub threads: usize,
pub follow_symlinks: bool,
pub skip_hidden: bool,
pub excluded: Vec<PathBuf>,
pub unavailable_roots: Vec<PathBuf>,
pub same_artist: Vec<Chosen>,
}Expand description
Knobs governing a traversal. Default gives the settings suited to a
personal library: automatic parallelism, no symlink following, hidden
entries left alone.
Fields§
§force_read: boolRead every accessible file again while retaining the previous catalog as evidence for inaccessible paths. This does not discard cached data merely because a watched drive or subfolder cannot be read.
threads: usizeNumber of reader threads. 0 = automatic detection.
follow_symlinks: boolFollow symbolic links (with loop detection).
Skip files and folders starting with a dot.
excluded: Vec<PathBuf>Folders never to walk into, canonical, whatever a root says.
A music folder is rarely only music: Audiobooks, Podcasts,
_incoming, a Samples folder for a DAW. Without this the only way to
keep them out of the catalog is to reorganise the disk to suit the
program, which is the wrong way round.
They live in the catalog, not in this run’s options, because a
plain aede scan re-reads every watched root: an exclusion that had to
be retyped would be forgotten exactly when it mattered.
Roots explicitly known to be unmounted, even when an empty mountpoint remains.
same_artist: Vec<Chosen>Spellings the owner of the disk has said are one artist.
The half of artist identity no identifier can settle, and the reason it
travels here rather than in the catalog: it is the user’s, it lives
in user.json, and this crate does not read that file — the caller
does, as it does for every other statement in it.
It is applied when the graph is built, which is why a merge takes
effect on the next aede scan and not before: the spelling a track is
filed under is decided as the artist is interned, and there is no later
moment at which one row can become another without rebuilding
everything that points at it.
Trait Implementations§
Source§impl Clone for ScanOptions
impl Clone for ScanOptions
Source§fn clone(&self) -> ScanOptions
fn clone(&self) -> ScanOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more