Code reorganizing #17
@@ -1,6 +1,5 @@
|
|||||||
use lofty::file::AudioFile;
|
use lofty::file::AudioFile;
|
||||||
|
|
||||||
// use ty
|
|
||||||
use crate::types;
|
use crate::types;
|
||||||
|
|
||||||
fn get_type(t: types::Type) -> Result<String, std::io::Error> {
|
fn get_type(t: types::Type) -> Result<String, std::io::Error> {
|
||||||
@@ -21,7 +20,6 @@ pub fn get_meta(t: types::Type, filepath: &String) -> Result<String, std::io::Er
|
|||||||
{
|
{
|
||||||
Ok(flac_file) => match flac_file.vorbis_comments() {
|
Ok(flac_file) => match flac_file.vorbis_comments() {
|
||||||
Some(vb) => {
|
Some(vb) => {
|
||||||
println!("Info: {:?}", vb);
|
|
||||||
let type_str: String = get_type(t).unwrap();
|
let type_str: String = get_type(t).unwrap();
|
||||||
match vb.get(&type_str) {
|
match vb.get(&type_str) {
|
||||||
Some(val) => Ok(val.to_owned()),
|
Some(val) => Ok(val.to_owned()),
|
||||||
|
|||||||
Reference in New Issue
Block a user