Progromatically Sorting MP3s


Results 1 to 6 of 6

Thread: Progromatically Sorting MP3s

  1. #1
    Join Date
    Jul 2003
    Location
    AK
    Posts
    429

    Progromatically Sorting MP3s

    I have a huge pishposh assortment of MP3s. I have taken it upon myself to sort them the way I like, and am now looking to using a little scripting to take care of some of the stupid work.

    The sorting method is:

    /mp3s/$artist/$songtitle.mp3

    What I was going to do is find a command line utility (I havn't played with any... I know they are there, if anyone has a favorite, chime in) so i can just go through every directory and tell it to:
    a) clear the tag
    b) set artist box to whatever $artist currently is
    c) set title box to whatever $songtitle is

    That much is easy. What I want to do 2nd, which is what is mainly getting me, is go through every artist directory, and check for complete cds. It can then write a playlist based on that cd, put the files in order, etc.

    I was hoping to use CDDB for this, but it looks like freedb.org will only allow you to search by discid and not artist. What a bummer! Does anyone know of any commandlike type utilities I can use to do a search and return some sort of data structure? Perhaps a library? I'm capable of doing this in C as well. Just hoping someone has an idea of where to go with this, because I'm stumped.
    "...the TCO for the Windows Server System was about 20% less expensive than Linux."
    --Keith Morrow, CIO, 7-Eleven, Inc

    "We got to market 6 months faster, and saw 14 percent in cost savings over Linux."
    --Owen Flynn, CTO, Equifax, Inc

    Microsoft Server System, Get the facts!

  2. #2
    Join Date
    May 2003
    Posts
    145
    I know of a program, but it auotmatically reports all findings to the RIAA ;-p

    Seriously, it is PEOPLE LIKE YOU SCHMUCKS THAT ARE UNDERMINING THE CAPITALIST SYSTEM AND INCREASING THE FRIGGIN WEALTH GAP!

    Since the police don't help with stolen IP, only companies that can invest millions on copy protection and lawsuits can afford to enter mainstream markets for fear of piracy. The result: no new startups and the rich get richer and the poor get poorer.

    Send the artist a check if you have brainwashed yourself that the record companies get paid too much of the cut - send 50 cents per each MP3. Use the little artists if you think the big ones are paid too much.

  3. #3
    Join Date
    May 2003
    Posts
    145
    err...sorry - went a little overboard.

    I would use PERL in conjunction with a program such as mp3info (http://ibiblio.org/mp3info/) to do the sorting.

    You may want to start with something like (not tested):

    Code:
    #!/usr/bin/perl
    
    while (<*.mp3>) {
      #the following will fail silently if done before
      system('mkdir `mp3info -p "%a`');
      system('cp ' . $_ . ' `mp3info -p \'"%a/"%t.mp3`'\');
    }
    Edit: code correction

  4. #4
    Join Date
    Jul 2003
    Location
    AK
    Posts
    429
    Seriously, it is PEOPLE LIKE YOU SCHMUCKS THAT ARE UNDERMINING THE CAPITALIST SYSTEM AND INCREASING THE FRIGGIN WEALTH GAP!

    Since the police don't help with stolen IP, only companies that can invest millions on copy protection and lawsuits can afford to enter mainstream markets for fear of piracy. The result: no new startups and the rich get richer and the poor get poorer.

    Send the artist a check if you have brainwashed yourself that the record companies get paid too much of the cut - send 50 cents per each MP3. Use the little artists if you think the big ones are paid too much.
    Lalalala. How about asking how many cds I own before going on a spiel? How many concerts (A decent way to support artists) I attend?

    Such things seem important to such a discussion... really, if I like a game/music/movie, whatever, I try and buy it. If I try something and I don't like it, I don't feel the least bit guilty not giving my money to them (*cough* farcry *cough*).

    Anyways, Thanks for the perl code, I'll play with it a bit and see what happens.
    "...the TCO for the Windows Server System was about 20% less expensive than Linux."
    --Keith Morrow, CIO, 7-Eleven, Inc

    "We got to market 6 months faster, and saw 14 percent in cost savings over Linux."
    --Owen Flynn, CTO, Equifax, Inc

    Microsoft Server System, Get the facts!

  5. #5
    Join Date
    Nov 2002
    Posts
    205
    Originally posted by cfaun5
    I know of a program, but it auotmatically reports all findings to the RIAA ;-p

    Seriously, it is PEOPLE LIKE YOU SCHMUCKS THAT ARE UNDERMINING THE CAPITALIST SYSTEM AND INCREASING THE FRIGGIN WEALTH GAP!

    Since the police don't help with stolen IP, only companies that can invest millions on copy protection and lawsuits can afford to enter mainstream markets for fear of piracy. The result: no new startups and the rich get richer and the poor get poorer..
    Wow, this has nothing to do with linux and its real early for me but i can't with a clear mind let this one go.... You do realize that the current main distribution system would be the one that keeps small artists and labels from going main stream right? like like like cd's in record stores? and that only some huge mega artisits really ***** about the p2p system right? show me a small artist who *****es about ppl downloading thier ****. next, music cds arnt known for thier copy protection you know? also im pretty sure that p2p has nothing to do with the fact that the wealth gap is increasing. thats kind of on inherint problem with the system...and most systems.
    sorry this is so off topic. but whatever.

  6. #6
    Join Date
    Apr 2001
    Location
    SF Bay Area, CA
    Posts
    14,936
    Well, I was hoping I wasn't going to have to close this thread after those comments from cfaun5.

    It appears I was proven wrong.

    dboyer, if you want to repost this in another thread, feel free (it's not your post that started it, it was the first inflammatory reply). But I think you've gotten a satisfactory script, so whichever.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •