diff options
| author | salmonik <raisersoft@proton.me> | 2026-05-05 23:29:39 +0200 |
|---|---|---|
| committer | salmonik <raisersoft@proton.me> | 2026-05-05 23:29:39 +0200 |
| commit | 5f2d1897b245fbee12d17b5910eaf5233ca6802b (patch) | |
| tree | 551b8855ade2f31e0f24539504b0f9b66cdba75f /src/database.rs | |
| parent | Add dev/release config separation and volume query command (diff) | |
| download | rsplayer-5f2d1897b245fbee12d17b5910eaf5233ca6802b.tar.gz rsplayer-5f2d1897b245fbee12d17b5910eaf5233ca6802b.zip | |
Add unit tests in /tests directory for config, database, playback, and scrobbler modules
Diffstat (limited to 'src/database.rs')
| -rw-r--r-- | src/database.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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 { | |||
| 220 | } | 220 | } |
| 221 | } | 221 | } |
| 222 | 222 | ||
| 223 | fn is_audio_file(path: &Path) -> bool { | 223 | pub fn is_audio_file(path: &Path) -> bool { |
| 224 | path.extension() | 224 | path.extension() |
| 225 | .and_then(|ext| ext.to_str()) | 225 | .and_then(|ext| ext.to_str()) |
| 226 | .map(|ext| { | 226 | .map(|ext| { |
| @@ -232,7 +232,7 @@ fn is_audio_file(path: &Path) -> bool { | |||
| 232 | .unwrap_or(false) | 232 | .unwrap_or(false) |
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | fn extract_metadata(path: &Path) -> (String, String, String, Option<i32>, Option<u64>) { | 235 | pub fn extract_metadata(path: &Path) -> (String, String, String, Option<i32>, Option<u64>) { |
| 236 | let file_stem = path | 236 | let file_stem = path |
| 237 | .file_stem() | 237 | .file_stem() |
| 238 | .and_then(|s| s.to_str()) | 238 | .and_then(|s| s.to_str()) |
