From 5f2d1897b245fbee12d17b5910eaf5233ca6802b Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 5 May 2026 23:29:39 +0200 Subject: Add unit tests in /tests directory for config, database, playback, and scrobbler modules --- src/database.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/database.rs') diff --git a/src/database.rs b/src/database.rs index 9d1d5f2..b7b8e88 100644 --- a/src/database.rs +++ b/src/database.rs @@ -220,7 +220,7 @@ impl Database { } } -fn is_audio_file(path: &Path) -> bool { +pub fn is_audio_file(path: &Path) -> bool { path.extension() .and_then(|ext| ext.to_str()) .map(|ext| { @@ -232,7 +232,7 @@ fn is_audio_file(path: &Path) -> bool { .unwrap_or(false) } -fn extract_metadata(path: &Path) -> (String, String, String, Option, Option) { +pub fn extract_metadata(path: &Path) -> (String, String, String, Option, Option) { let file_stem = path .file_stem() .and_then(|s| s.to_str()) -- cgit v1.2.3