From 743b87fc7aea1aa90cfacee17cdac8ca818c5661 Mon Sep 17 00:00:00 2001 From: jakka Date: Thu, 12 Jun 2025 21:48:22 +0300 Subject: continued writing db logic. added files indexing --- src/flac.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/flac.rs') diff --git a/src/flac.rs b/src/flac.rs index 04504f8..16627e2 100644 --- a/src/flac.rs +++ b/src/flac.rs @@ -12,7 +12,6 @@ use symphonia::core::{ meta::MetadataOptions, }; -#[allow(dead_code)] pub const CURRENT_VENDOR: &str = "reference libFLAC 1.5.0 20250211"; struct StreamConfig { @@ -280,9 +279,9 @@ pub fn encode_file(filename: impl AsRef) -> Result<()> { Ok(()) } -pub fn get_vendor(file: &Path) -> String { - let tag = Tag::read_from_path(file).unwrap(); - tag.vorbis_comments().unwrap().vendor_string.clone() +pub fn get_vendor(file: &Path) -> Result { + let tag = Tag::read_from_path(file)?; + Ok(tag.vorbis_comments().unwrap().vendor_string.clone()) } #[cfg(test)] -- cgit v1.3.1