pub struct BookFolder {
pub folder_path: PathBuf,
pub name: String,
pub case: BookCase,
pub tracks: Vec<Track>,
pub mp3_files: Vec<PathBuf>,
pub m4b_files: Vec<PathBuf>,
pub cover_file: Option<PathBuf>,
pub cue_file: Option<PathBuf>,
pub audible_metadata: Option<AudibleMetadata>,
pub detected_asin: Option<String>,
pub merge_pattern_detected: bool,
}Expand description
Represents an audiobook folder with its contents and metadata
Fields§
§folder_path: PathBufPath to the folder
name: StringFolder name (used as book title)
case: BookCaseClassification case
tracks: Vec<Track>List of audio tracks found
mp3_files: Vec<PathBuf>MP3 files found (before analysis)
m4b_files: Vec<PathBuf>M4B files found
cover_file: Option<PathBuf>Cover art file path
cue_file: Option<PathBuf>CUE file path (if present)
audible_metadata: Option<AudibleMetadata>Audible metadata (if fetched)
detected_asin: Option<String>Detected ASIN from folder name or metadata
merge_pattern_detected: boolWhether a merge pattern was detected for multiple M4B files
Implementations§
Source§impl BookFolder
impl BookFolder
Sourcepub fn get_total_duration(&self) -> f64
pub fn get_total_duration(&self) -> f64
Get total duration of all tracks in seconds
Sourcepub fn get_best_quality_profile(
&self,
prefer_stereo: bool,
) -> Option<&QualityProfile>
pub fn get_best_quality_profile( &self, prefer_stereo: bool, ) -> Option<&QualityProfile>
Get the best quality profile among all tracks
Sourcepub fn can_use_concat_copy(&self) -> bool
pub fn can_use_concat_copy(&self) -> bool
Check if all tracks can be concatenated without re-encoding (copy mode)
Sourcepub fn get_output_filename(&self) -> String
pub fn get_output_filename(&self) -> String
Get output filename for the M4B file
Sourcepub fn estimate_output_size(&self) -> u64
pub fn estimate_output_size(&self) -> u64
Get estimated file size in bytes (rough estimate)
Sourcepub fn is_processable(&self) -> bool
pub fn is_processable(&self) -> bool
Check if folder is processable (Case A, B, or E)
Sourcepub fn get_album_artist(&self) -> Option<String>
pub fn get_album_artist(&self) -> Option<String>
Get album artist from tracks (first non-None value)
Sourcepub fn get_album_title(&self) -> Option<String>
pub fn get_album_title(&self) -> Option<String>
Get album title from tracks (first non-None value)
Trait Implementations§
Source§impl Clone for BookFolder
impl Clone for BookFolder
Source§fn clone(&self) -> BookFolder
fn clone(&self) -> BookFolder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for BookFolder
impl RefUnwindSafe for BookFolder
impl Send for BookFolder
impl Sync for BookFolder
impl Unpin for BookFolder
impl UnwindSafe for BookFolder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more