id3tagfs - a filesystem for mp3 files
id3tagfs is a small stackable read-only filesystem that adds id3 tags to mp3 according to the directory structure. The filesystem does not modify the actual files on disk, but when a file is read through id3tagfs it prepends to its contents an id3 tag filled it in with info taken from the file's path. This filesystem can be used to replace or complement the id3 tags present in the mp3 files. The filesystem was based on a fistgen generated template.
the tag
the tag is a v 2.4.0 id3 tag containing the tags : TIT2 (title), TPE1 (artist), TALB (album), TCON (genre), TRCK (track number), TDRL (release timestamp) and TYER (v 2.3 year, for backwards compatibility). All strings in the tag are UTF-8 strings.
A format string is given as a mount time option describing how id3tagfs should extract the id3 tags from the directory structure.
The default behaviour, if no format string specified, is :
Artist is taken to be the 1st level directory
Album is the second level directory
Year is also taken from the 2nd level directory if it ends with (XXXX)
Track number is taken from the filename, if it starts with "XX -", where XX is any number up to 255
Finally the rest of the filename is taken to be the title (the .mp3 is stripped)
Underscores, "_", are converted to spaces.
the source
id3tagfs v0.12
id3tagfs v0.11
id3tagfs v0.10
id3tagfs v0.01
(see INSTALL and README for installation and usage)
the future
here's a list of things that *could* go into id3tagfs
- a special folder where you can drop mp3s and it will create the dir structure based on their tags
- a 'recent items' folder where recently accessed files are symlinked into
- collect statistics eg. play count, when files are read and store them as fs metadata, (maybe xattr?)
- ioctls for the above stats
- list only mp3s, (mount-time option)
- fix page caching bugs
- surely there's bugs with the format string!
- support other tag formats?
- option to specify tag size
- some error checking!
- option to capitalize strings
- option to set default (or force) values of tags (eg Genre defaults to 'Other')