notryanb / nu_plugin_id3

A Nushell plugin to get Id3 tag information as structured data.
6 stars 1 forks source link

Parse Id3v1 tags #3

Open notryanb opened 4 years ago

notryanb commented 4 years ago

Currently the rust id3 crate defaults to parsing id3 tags as Id3v2.x. It will fail to parse a tag that is v1. The plugin should fallback to v1 if v2 fails.

Delapouite commented 4 years ago

Hello

Should the version number be provided as an argument? This way the user could explicitly display v1 or v2 tags. A both argument is also very useful to quickly discover which files have information in both formats which is a bit redundant and may be cleaned in a later operation.

notryanb commented 4 years ago

@Delapouite I was thinking this plugin should be parsing a file at the version it supports/specifies and return the version number as a column. nushell can filter the data beyond that with the where command. ex id3 | where Version == "Id3v2.4" or id3 | where Version == "ID3v1".

I am very new to ID3 parsing. I am under the impression that a file can only contain a single version of the ID3 tag, as that is encoded into the header? I am also assuming mixing frames that exist between ID3 versions inside the same tag would be against the standard? I need to do more reading on this.