This post prompted, in a strange and still unclear wise, me to revisit an idea I've occasionally kicked around but never actually made any progress on in the past: namely, to move from my current system for tracking albums and generating my master playlist, based exclusively on the filesystem, to a more flexible actual database, which would allow me also to track, for instance, how many times a song has been played, and potentially much more if I ever bothered to think it up. Nevermind that there are already many such programs/systems, even ones that work as plugins for the xmms/beep/audacious family of media players, better than anything I'm likely to come up with—nevermind that.
The real problem, the extent of which I now realize: since I'm just using the songchange plugin in audacious, but otherwise am only using it for playback and whatnot, I still move things around, retag, etc using the commandline. But I can't use (say) `mv' if I want to move a directory somewhere, because mv doesn't know about the database. So I have to write at least interfaces that are database-aware to all the ordinary filesystem-manipulation programs that I might use. So far: a mv-alike for things within the db, an rm-alike, a tool to add things to the db, a replacement to my old `albums' program (which both cleaner and shorter—hooray). To come: a rename-alike, a playlist generator, and an interface to my tagging script. And at some point something which I couldn't already have done before, I guess.
At least it's keeping me off the streets (and from doing other work).
Probably much too late, but one hybrid approach that lets you keep filesystem operations while allowing for metadata is something like what Subversion does: keep each directory's files' data in a hidden file in the directory. Admittedly, this requires that you traverse the tree in an expensive way whenever you want to calculate something, but it makes it much easier to keep things in sync.
Posted by: tom | January 05, 2007 at 08:02 PM
Though you would still have to take some steps to ensure that things stayed in sync. If, say, you renamed one file (or changed whatever it was that tied the data in the hidden file to it), you'd then have to update that too.
Fortunately, assuming they actually work, writing these little utility scripts has been pretty straightforward; only one of them's over 100 lines and most are around 50.
Posted by: ben wolfson | January 05, 2007 at 08:12 PM
Or you could just use iTunes.
(Ducks)
Posted by: mrh | January 06, 2007 at 08:36 AM
On linux?
Posted by: ben wolfson | January 06, 2007 at 09:19 AM
All of the above have been finished and even moderately tested!
Posted by: ben wolfson | January 06, 2007 at 01:51 PM