audiotags icon indicating copy to clipboard operation
audiotags copied to clipboard

`wav`/`aiff` file support

Open lukethacoder opened this issue 3 years ago • 5 comments
trafficstars

Is there a reason wav/aiff files are not supported? Had a poke around in the id3 package and it looks like they are supported over there?

lukethacoder avatar Oct 12 '22 19:10 lukethacoder

This crate is passively maintained. If you'd like to submit a PR to add that support it'll likely be added :slightly_smiling_face:.

Serial-ATA avatar Nov 19 '22 16:11 Serial-ATA

Had a deeper look into how id3 manages wav/aiff files. It has special methods specifically for reading those file types (read_from_wav_path/read_from_aiff_path).

Looking at how this package has been built it doesn't look like an easy task to implement support for wav/aiff file types. The dynamic inner class assumes the package (id3 in this case) uses the read_from_path method for reading files.

https://github.com/TianyiShi2001/audiotags/blob/2fa3f6c0d2d45d471a90b4c68ffa5c5cc8fd36a8/audiotags-dev-macro/src/lib.rs#L27-L32

I assume adding support for wav/aiff file types would involve a refactor of the audiotags-dev-macro to allow custom path reader methods.

lukethacoder avatar Nov 21 '22 11:11 lukethacoder

Yeah, it's definitely not the easiest problem to solve. Could always just do this:

impl Id3v2Tag {
   pub fn read_from_wav_path(path: impl AsRef<Path>) -> Self {
       // ...
   }
}

// Then

use audiotags::components::Id3v2Tag;

fn main() {
    let tag = Id3v2Tag::read_from_wav_path("foo.wav");
}

Since this behavior is exclusive to ID3v2.

Serial-ATA avatar Nov 21 '22 13:11 Serial-ATA

Hey! I've just implemented this "crutch": https://github.com/andreykaere/audiotags. Feel free to use it if you need it

andreykaere avatar Nov 04 '23 23:11 andreykaere

hey there, i was recently comparing id3 and audiotags for a little project i'm working on, and found this issue. id3 improved the behavior on their end a few months ago, so the only thing you really need now is a version bump (see the PR).

jct-tympanon avatar May 22 '24 21:05 jct-tympanon