From fa5203013c369ae10696c26552d4ef63bf3e558b Mon Sep 17 00:00:00 2001 From: phoenix Date: Tue, 21 Oct 2025 20:02:19 -0400 Subject: [PATCH] tsk-45: Adding functionality for itdentifying Song --- src/detection/song.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/detection/song.rs diff --git a/src/detection/song.rs b/src/detection/song.rs new file mode 100644 index 0000000..03563a6 --- /dev/null +++ b/src/detection/song.rs @@ -0,0 +1,15 @@ + + +pub fn file_type_from_filepath(filepath: &str) -> Result { + match infer::get_from_path(filepath) { + Ok(Some(kind)) => { + Ok(String::new()) + } + Ok(None) => { + Err(std::io::Error::other("File type not determined")) + } + Err(err) => { + Err(err) + } + } +}