De-RIAAing my music collection

I recently decided that I won’t own any music from an artist that is represented by the RIAA. Now, how do I go about De-RIAAing my ripped albums?

RIAA Radar has a website that will let you search for artists, albums, keywords, etc and it will give you information as to whether or not an album was released under the RIAA.

So I did a view-source on their search page and determined that there are only three variables that you need to POST in order to search: searchtype, keyword, and submit.

I can use wget to grab the file, like so:
wget http://www.riaaradar.com/search.asp --post-data "searchtype=ArtistSearch&keyword=Audioslave&submit=Go\!" -O Audioslave

This saves the file as Audioslave. Audioslave IS represented by the RIAA, by the way.

Now, how do I take my ripped albums and compare them to the RIAA Radar site?


In my album collection, all of the albums are formatted the same: Artist - Album Name
This little bit of effort a long time ago makes it easy for me to separate these now.
I simply cd into my albums directory and do the following:
ls|awk '{FS="-"};{ print $1}'|uniq >> artists

I now have a file called artists in my album collection that contains unique artist names for every album in the collection.

Now, to find out if they’re represented by the RIAA:

cat artists|tr " " "+"|xargs -i wget http://www.riaaradar.com/search.asp --post-data "searchtype=ArtistSearch&keyword={}&submit=Go\!" -O radarresults{}.html

This will pull down the search result for every artist in my album list, and save it in a file formatted the way I want.
For instance, Jimi Hendrix would be saved as radarresultsJimi+Hendrix.html

I browse this with lynx and see that the text “Warning!” would be pretty good to search on.

grep Warning! radarresults*|sed -e 's/<[^<>]*>//g'|tr "+" " "|cut -c 13-|uniq|awk '{FS=".html"};{print $1}' >> riaapunks.txt

Explanation: grep searches the files for Warning!, then sed strips out the html. tr converts those + signs to spaces, cut trims off the radarresults portion of the output, uniq filters out duplicates, awk cuts off everything after and including .html, then it all gets dumped to a file.

Now I’ve got a nice list of everyone who is represented by the RIAA, in a file called riaapunks.txt

Now I get to have fun with it!
cat riaapunks.txt|xargs --verbose -i find ./ -name *{}*

Output looks good. Now for the coup de grace:
cat riaapunks.txt|xargs --verbose -i find ./ -name *{}* -delete

Buh-bye RIAA music!

One Response to “De-RIAAing my music collection”

  1. KristjanS Says:

    I checked my music collection out, being curious about it myself. I found that all my albums except one we’re not covered by RIAA. Ironically, it also happened to be the only album that I downloaded illegally. Rest of my music is purchased from eMusic.com.

Leave a Reply

You must be logged in to post a comment.