pub struct Config {Show 20 fields
pub directory: PathBuf,
pub path_default: String,
pub path_comp: String,
pub replace: Vec<(Regex, String)>,
pub asciify_paths: bool,
pub original_date: bool,
pub per_disc_numbering: bool,
pub move_files: bool,
pub fetch_art: bool,
pub art_max_width: u32,
pub art_min_width: u32,
pub art_quality: u8,
pub art_ratio: Option<Ratio>,
pub art_high_resolution: bool,
pub strong_threshold: f64,
pub musicbrainz_contact: String,
pub cache_dir: Option<PathBuf>,
pub import_added: bool,
pub ft_in_title: Option<FtInTitle>,
pub discogs: Option<DiscogsConf>,
}Fields§
§directory: PathBuf§path_default: Stringfb2k-style templates, without extension.
path_comp: String§replace: Vec<(Regex, String)>§asciify_paths: bool§original_date: boolTake the year from the first release of the release group, so a 2011 remaster of a 1977 album files under 1977.
per_disc_numbering: boolNumber tracks within each disc rather than across the release.
move_files: bool§fetch_art: bool§art_max_width: u32Largest cover width to embed; Cover Art Archive serves 250, 500 and 1200 thumbnails, and the nearest one at or below this is used.
art_min_width: u32Smallest cover width accepted; a smaller candidate is skipped.
art_quality: u8JPEG quality used when a cover is resized and re-encoded.
art_ratio: Option<Ratio>How far from square a cover may be before it is rejected.
art_high_resolution: boolPrefer the Cover Art Archive’s full-size original over its thumbnails.
strong_threshold: f64Below this distance a match is applied without asking.
musicbrainz_contact: String§cache_dir: Option<PathBuf>Where MusicBrainz responses are kept between imports.
import_added: boolKeep a file’s own modification time as its library added time, and
preserve mtimes across moves, copies and tag writes, so a re-import
or re-file never makes an old album look newly added. True when
beets’ importadded plugin is enabled. beets also has
importadded.preserve_mtimes and importadded.preserve_write_mtimes
options, both true by default; sift does not read them and always
behaves as if both are on once the plugin is listed.
ft_in_title: Option<FtInTitle>beets’ ftintitle plugin: fold a featured artist out of the track
artist and into the title. None when the plugin isn’t enabled.
discogs: Option<DiscogsConf>Set only when the discogs plugin is listed and a token is
available, from discogs.user_token or DISCOGS_TOKEN.
Implementations§
Source§impl Config
impl Config
Sourcepub fn load(path: &Path) -> Result<Self, ConfigError>
pub fn load(path: &Path) -> Result<Self, ConfigError>
Load a beets config, following include: relative to its directory.
Later files override earlier ones, as in beets: includes first, then
the file itself.
Sourcepub fn default_path() -> Option<PathBuf>
pub fn default_path() -> Option<PathBuf>
$BEETSDIR/config.yaml, then ~/.config/beets/config.yaml.