TINT based filing and human readable with FUSE and pytagsfs

2011 September 20
by Simba
├── Canaro, Rafael
│   ├── HQCD 99 Buenos Aires to Paris - Argentine tango performers in France 1924-1938
│   │   └── La mélodie de notre adieu.flac
│   ├── ORQ 232 Rafael Canaro en Francia (1936-1939)
│   │   ├── 01 Alma de bandoneón (Mario Beltrán).flac
│   │   ├── 02 Campanas del recuerdo.flac

│   │   ├── 21 Olvidame (Luis Mariano).flac
│   │   └── 22 Callecita de mi novia (Luis Mariano).flac
│   └── ORQ 233 1929-1945
│       ├── 01 Las vueltas de la vida.flac
│       ├── 02 Zaraza (Rafael Canaro, Carlos Dante).flac
│       ├── 03 Caminito.flac

│       ├── 21 Garúa (Jorge Cardozo).flac
│       └── 22 Tortazos (Jorge Cardozo).flac

As part of restoring from a disk crash, I am moving to TINT based filing, which is a neat way to sort out duplicates, and useful if you want to share playlists or just make sure your playlists will keep working in the future. However it is not very convenient when you want to browse your file system for a particular file or album, in that case you need to use an application which reads the tags of the audio files or an inclination to remember barcodes.

It turns out that I browse my files for specific music a lot, as part of the user experience of my Squeezebox setup (my preference for tango music, not the only option). I’ve been aware of the pytagsfs project for a while, and this prompted me to finally give it a spin. It seems to work quite well, and at least for the time being that will be the setup on my server.

Two things caused me a bit of head scratching, though:

1. One has to enable allow_other for fuse in /etc/fuse.conf and set read permissions for that file allowing the user mounting the pytagsfs to read it. Without allow_other, the squeezeboxserver would not be allowed to see the virtual file system, neatly organized by artist, album and title.

2. pytagsfs does not support tags containing slashes (obvious in retrospect, took me a while to figure out), and in my first attempts lots of files simply didn’t show up.

Now it works just fine with the following options (tint based files in directory tint and the new mount point is tango):

$ pytagsfs -o allow_other -o format='%?%{artistsort}%:%{artist}%?/%?%{catalognumber} %?%{album}/%?%{TRACKNUMBER} %?%{title}.%{extension}' ../tint/ tango/

I can think of a few other use cases that could be useful, too, for example if you’re happy with your current layout but want the TINT filing for canonical playlists, you should be able to do something like the following (I did not test this):

$ pytagsfs -o allow_other -o format='%{TIN}/%{discnumber}/%{tracknumber}.%{extension} tango-dir/ tint-dir/

You could list all albums from a series, list songs alphabetically or chronologically by artist etc. I have been thinking about a nice way to combine files from different trees, some which are processed and some that are originals  with the srcfilter option, but I haven’t really had time to work it out yet.

3 Responses leave one →
  1. 2011 September 21

    Thanks for that, Simba.

    > pytagsfs does not support tags containing slashes

    Presumably likewise not ?, “, and (used by tango.info to separate lines) | , which is rather a problem since most tango collections are going to contain some of those. You say you then got it to work ‘just fine’. Did you overcome this problem?

  2. 2011 September 22

    I only experienced problems with slashes, which shouldn’t be surprising as it is the directory delimiter. Other than that, I believe all other characters are supported. Possibly with the exception of trying to create a directory called “.” or “..” which I believe are reserved.

    Since you ask, I just checked, and the pytagsfs mount has files with all the characters you mention as well as accents. So no problem there.

    I substituted all the slashes in the relevant tags to dashes or |, fairly easy in fb2k: $replace(%title%,/,-) for instance. Maybe do a smart playlist to weed them out.

  3. 2011 September 26

    Good news. Thanks.

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS