trackfs
trackfs copied to clipboard
Custom file-names formats?
Hello,
the default file-names are
{album-file}.#-#.{tracknumber}.{track-title}.flac
That produces very long file-names though. Would it be possible to specify to have something like
{tracknumber}.{track-title}.flac ?
As a beginner I tried to give a look into trackfs/fusepath.py and editing 53, but with no results.
Hello,
not sure this is still relevant to you, but I just realized that I never responded to your question:
In short; In the way trackfs is currently implemented, this would not be possible
Background: trackfs has two primary functions: When you access a directory in the target mountpoint, it returns on the fly virtual files for the individual tracks, and when you access one of those virtual files, it extracts the corresponding track from the source file on the fly. But it doesn't have any kind of database where it stores, to which track in a source file a virtual track file belongs. All this information is encoded in the name of the virtual file, and due to this {album-file}.#-#.{tracknumber} is essential for trackfs to work. The only part that trackfs doesn't technically require would be the track-title, but I guess that's the part you are most interested to keep.
I have no plans to embed a database that keeps the mapping of virtual track files to source albums and tracknumbers outside of the filesystem as this would make the solution significantly more complex.
One lightweight solution that I had once considered is to create a virtual subdirectory for each album file and then generate the individual tracks into this directory with your proposed filename. I ultimately decided against this, because often you store additional related files in the same directory (e.g. albumart) and many tools implicitly make use of those (e.g. a musicplayer displays the album cover). This would no longer work if those files would reside in another directly one level above.