Skip to content
FUSE virtual filesystem for organizing your music files
Branch: master
Clone or download
wfraser don't consider disc number when deciding if two tracks are the same
It's fairly common in cases of multiple file extensions to get cases
where the disc of one is '1' and the other is empty string, which then
ends up in both getting unique track IDs, and the extension priority
mechanism not working.

Disc number shouldn't be considered to be a part of a track's identity.
Latest commit bf2de82 Apr 29, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tools specify no tag to dump all tags Oct 28, 2015
.gitattributes gitignore update, gitattributes added Oct 6, 2014
.gitignore add checkempty to gitignore Apr 3, 2015
.travis.yml add travis envs for GCC-7 and Clang-5 Oct 25, 2017
ISSUES resolved an issue :) Apr 1, 2015
Makefile also use pkg-config for linker args Oct 28, 2017
README.md remove genre from pattern Oct 15, 2014
aliases.cpp fix broken artist aliases parsing Apr 23, 2018
aliases.h copyright Apr 1, 2015
database.cpp don't consider disc number when deciding if two tracks are the same Apr 29, 2018
database.h use std::string for building database path Apr 23, 2018
groveler.cpp
groveler.h copyright Apr 1, 2015
logging.h copyright Apr 1, 2015
main.cpp use std::string for building database path Apr 23, 2018
musicinfo.cpp sort C++ includes and add missing <functional> Oct 21, 2017
musicinfo.h copyright Apr 1, 2015
path_pattern.cpp sort C++ includes and add missing <functional> Oct 21, 2017
path_pattern.h copyright Apr 1, 2015
util.h

README.md

MusicFS

MusicFS is a FUSE virtual filesystem for Linux that presents an organized view of your music files, based on their tag metadata.

(It's still experimental at this time.)

Dependencies

  • FUSE
  • TagLib
  • SQLite
  • A C++ compiler with C++14 support. G++ and Clang are both tested.

Why

If you're like me, you've got several thousand music files in various formats, accumulated over the years from numerous sources (ripped CDs, LP recordings, mixtapes from your friends, etc.).

If you've been less-than-fastidious with your organization, they're spread out in various folder structures in a pretty arbitrary way.

MusicFS goes through all these files, pulls out the information from their metadata (whatever format that is, using the awesome TagLib library), and presents them as a well-organized heirarchical tree.

By default, this goes /<album artist>/[<year>] <album name>/<track number> - <track title>.<extension>, but this is configurable at run-time.

How to use

  1. git clone https://github.com/wfraser/MusicFS.git
  2. cd MusicFS
  3. make
  4. ./musicfs -v /path/to/your/music /some/mountpoint

The first time this runs, it will take a bit of time to go through all your music. Subsequent times will be much, much faster (it skips over un-changed files).

The organized view of your music is read-only. If you need to update the metadata in a file, do so on the original file, unmount MusicFS, and run it again. It will detect the changed files and update paths accordingly.

Note that MusicFS by default stores its data in a file named music.db in whatever directory musicfs is run from. Specify a specific database path using -o database=/path/to/database, (or make sure to always run it from the same working directory) to save it lots of time re-examining your files.

Options

In addition to the usual FUSE options, MusicFS supports an option for letting you configure the tree layout. Specify -o pattern=<pattern> when running MusicFS. The format of the pattern is a string containing any of the following tokens (no leading slash, please):

  • %albumartist%
  • %artist%
  • %album%
  • %year%
  • %track%
  • %title%
  • %ext%

The default pattern is %albumartist%/[%year%] %album%/%track% - %title%.%ext%. Make sure when specifying -o format to use quotes as appropriate. E.g.: sudo ./musicfs -v -o allow_other,format="%ext%/%albumartist% - %album% (%year%)/%track% - %artist% - %title%.%ext%" /archive/music /srv/music

Future ideas

Some, all, or none of these might happen in the future:

  • Read/Write mode? Allow editing metadata in-place, with MusicFS rearranging files immediately.
  • Allow re-scanning files while the FS is mounted?
You can’t perform that action at this time.