musicutil/src/utils/mod.rs

17 lines
377 B
Rust
Raw Normal View History

2022-10-22 14:16:02 +01:00
use std::path::{Path};
2022-08-16 09:05:18 +01:00
pub mod ascii_reduce;
pub mod transcoder;
2022-10-22 15:15:37 +01:00
pub(self) mod tag_extractor;
pub(self) mod music_scanner;
2022-08-16 09:05:18 +01:00
2022-10-22 15:15:37 +01:00
pub use tag_extractor::extract_tags_from_file;
pub use music_scanner::scan_for_music;
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
}