From 7797c1e92baf602d36da9e32889bc5a589c633ef Mon Sep 17 00:00:00 2001 From: Serial <69764315+Serial-ATA@users.noreply.github.com> Date: Sat, 17 Apr 2021 15:45:40 -0400 Subject: [PATCH] Forgot to remove stuff from testing Signed-off-by: Serial <69764315+Serial-ATA@users.noreply.github.com> --- Cargo.toml | 3 +-- src/components/logic/read.rs | 8 +++----- src/components/tags/wav_tag.rs | 16 ++-------------- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cc18cb8d..3c8881d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,6 @@ categories = ["accessiblity", "multimedia::audio"] # Ape ape = {version = "0.3.0", optional = true} # Wav -sndfile-sys = {version = "0.2.2", optional = true} riff = {version = "1.0.1", optional = true} # Mp3 id3 = {version = "0.6.2", optional = true} # De/Encoding @@ -39,7 +38,7 @@ default = ["full"] full = ["all_tags", "duration"] mp4 = ["mp4ameta"] mp3 = ["id3"] -wav = ["sndfile-sys", "riff"] +wav = ["riff"] vorbis = ["lewton", "metaflac", "opus_headers", "ogg"] all_tags = ["vorbis", "mp4", "mp3", "wav", "ape"] duration = ["mp3-duration"] \ No newline at end of file diff --git a/src/components/logic/read.rs b/src/components/logic/read.rs index b0d302ea..58345437 100644 --- a/src/components/logic/read.rs +++ b/src/components/logic/read.rs @@ -1,8 +1,8 @@ use super::constants::{ID3_ID, LIST_ID}; -use crate::{AnyTag, Error, Id3v2Tag, Result, ToAnyTag}; -use byteorder::{BigEndian, ByteOrder, LittleEndian, ReadBytesExt}; +use crate::{Error, Result, ToAnyTag}; +use byteorder::{LittleEndian, ReadBytesExt}; use std::collections::HashMap; -use std::io::{Cursor, Read, Seek, SeekFrom}; +use std::io::{Cursor, Read, Seek}; pub(crate) fn wav(mut data: T) -> Result>> where @@ -13,7 +13,6 @@ where let mut list: Option = None; for child in chunk.iter(&mut data) { - println!("{}", child.id()); let chunk_id = child.id(); let value_upper = std::str::from_utf8(&chunk_id.value)?.to_uppercase(); let value_bytes = value_upper.as_bytes(); @@ -45,7 +44,6 @@ where // TODO } - println!("{:?}", content); content.drain(0..4); // Get rid of the chunk ID let mut cursor = Cursor::new(&*content); diff --git a/src/components/tags/wav_tag.rs b/src/components/tags/wav_tag.rs index b64c7ce2..451e0fae 100644 --- a/src/components/tags/wav_tag.rs +++ b/src/components/tags/wav_tag.rs @@ -1,8 +1,8 @@ use crate::{ - impl_tag, traits::ReadPath, Album, AnyTag, AudioTag, AudioTagEdit, AudioTagWrite, Id3v2Tag, + impl_tag, traits::ReadPath, Album, AnyTag, AudioTag, AudioTagEdit, AudioTagWrite, Picture, Result, TagType, ToAny, ToAnyTag, }; -use std::borrow::BorrowMut; + use std::{collections::HashMap, fs::File, path::Path}; struct WavInnerTag { @@ -259,18 +259,6 @@ impl AudioTagEdit for WavTag { impl AudioTagWrite for WavTag { fn write_to(&self, file: &mut File) -> Result<()> { - // let (tag, data) = { - // let mut data = Vec::new(); - // - // let tag = if self.0.id3.is_some() { - // "ID3 " - // } else { - // "INFO" - // }; - // - // }; - // - // crate::components::logic::write::wav(file, ) Ok(()) }