← Back to team overview

pytagsfs team mailing list archive

Re: [Bug 327478] [NEW] How to handle compilation tracks



Thanks for your report/message.

On Tue, Feb 10, 2009 at 02:38:30AM -0000, wlof wrote:
> Is there any way for pytagsfs to handle compilation tracks?
> Most of my collection is formatted so : %artist/%album/%NUMBER -
> %title.%extension. But I have plenty of soundtracks and compilation
> discs, and I'd rather not have plenty of artists with only one or two
> tracks.

I handle this by creating two separate mounts: albums and compilations.  I use
the following options:

  format='/%a - %l/%N %a - %t [%l].%e',dstfilter='!^/[^/]* - [^/]* - [^/]*/'

  format='/%l/%N %a - %t [%l].%e',dstfilter='^/[^/]* - [^/]*/'

I tag all of my compilations such that the album title looks like "Various -
Compilation Name," so tracks on the compilations would have two hyphens if
formatted using the albums format string.  The dstfilter option filters
compilations out of the albums mount and albums out of the compilations mount
based on the number of hyphens in the final path.

It's a bit hackish, for sure, but it works for me.

> Ideally, these discs should be regrouped under fakes
> 'Soundtracks' and 'Compilation' artists (depending on whether Genre =
> 'Soundtrack' or Album Artist='Various Artists' or the compilation flag
> is set -- Album Artist being the TPE2 field and the compilation flag
> being the non-standard iTunes TCP field). Is this at all possible?
> I've looked a bit at the code and I don't think it's possible as of now,
> because pytagsfs is using mutagen's EasyID3 interface which doesn't
> handle advanced fields such as TPE2 or TCP.

I'm open to improving support for tag fields.  If you submitted a patch I'd be
happy to review it and, hopefully, apply it.

> Also, do you plan on implementing more complex logic in pytagsfs' format
> string? Right now the substitution trick can only handle this: "If this
> field is present then use this field, else use this other field (or
> string)". I'd like to be able to define more complex conditions such as:
> "If this field matches this string, then use this other field or string,
> else use yet another field or string". Kinda like what quodlibet (based
> on mutagen) allows, as described here:
> http://code.google.com/p/quodlibet/wiki/Guide_Renaming

Keeping things simple is good for performance reasons, but this is something
that I'd also be open to seeing ideas about.  It would be good to discuss the
syntax before you implement anything.

> I'm new to Python but I'd be willing to help implement these features if
> you think they're at all interesting.
> Sorry for this 'bug report' but I was unable to find a feature request
> form or a forum. You should open one: your software is awesome
> (seriously, I've been looking for something like this for years) but it
> seems to be lacking a community behind it.

There is a mailing list that you can join via launchpad.  Do you think that a
forum would help with developing a community to support pytagsfs more than a
mailing list?

Please join the mailing list for now so that we can discuss the items that
you've brought up so far.  I will consider opening a forum, but development
discussion will likely always take place on the mailing list.

> Also, sorry for my not so good English.

Your English is quite good, actually.

Forest Bond

Attachment: signature.asc
Description: Digital signature