LWN.net Logo

Me too...

Me too...

Posted Mar 9, 2006 18:35 UTC (Thu) by lysse (subscriber, #3190)
In reply to: I started such a project too :-) by felixfix
Parent article: Using Linux to manage a large audio collection

I did such a thing myself recently, although on a smaller scale - but instead of using SQL, what I did was simply:

  1. ensure all the files had the same naming convention to start with
  2. rename all the files to tNNNNN.mp3
  3. store number-to-name mappings in a text file, in the format
           tNNNN :: artist--track-name--version--remixer
    

So my everyday music player has simply become:

    while true; do
        while [ "$N" == "$T" ]; do
            N=`printf 't%05d' $(( $RANDOM % $TRACK_COUNT ))`
        done
        grep $N /music/directory.txt | sed -e 's/^.* :://'
        mpg321 -o esd -q /music/$N.mp3
        T=$N
    done

and if I want visualisation, I can start up synaesthesia. Hardly the most exotic of players, but it does what I want. If I wanted to ensure that certain tracks fell in runs, I could do that by adding a layer of indirection - numbering playlists and having mpg321 play them back instead. At some point I'll add a timestamped log and some basic transport control, when I get sufficiently annoyed to do so. I might even add all the ID3s back in...

As you might have gathered, I don't go much for GUIs (am I the only person who never worked out what the point of a file manager was?), and I am a great advocate of doing the simplest thing that can possibly work now :)


(Log in to post comments)

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.