2022-10-22 21:01:36 +01:00
|
|
|
use std::path::Path;
|
2022-08-16 09:05:18 +01:00
|
|
|
|
|
|
|
pub mod ascii_reduce;
|
2022-10-22 15:15:37 +01:00
|
|
|
pub(self) mod music_scanner;
|
2022-10-22 21:01:36 +01:00
|
|
|
pub mod replaygain;
|
|
|
|
pub(self) mod tag_extractor;
|
|
|
|
pub mod transcoder;
|
2022-08-16 09:05:18 +01:00
|
|
|
|
2022-10-22 15:15:37 +01:00
|
|
|
pub use music_scanner::scan_for_music;
|
2022-10-22 21:01:36 +01:00
|
|
|
pub use tag_extractor::extract_tags_from_file;
|
2022-08-16 09:05:18 +01:00
|
|
|
|
2022-10-22 15:15:37 +01:00
|
|
|
pub fn is_supported_file_extension(file_path: &Path) -> bool {
|
|
|
|
let ext = file_path.extension().unwrap().to_str().unwrap();
|
2022-08-16 09:05:18 +01:00
|
|
|
|
2022-10-22 15:15:37 +01:00
|
|
|
matches!(ext, "mp3" | "flac")
|
2022-08-16 09:05:18 +01:00
|
|
|
}
|