Use shell-fm for fun* and profit*

*where fun is great utility
*where profit is a rich storehouse of otherwise unsaveable audio tracks

I was supposed to post this about 8 months ago. Anyway, being that Last.fm was recently accused of handed over a load of non-anonymized data to the RIAA, I thought it would be fitting to post this info on basically abusing leveraging Last.fm through a combination of the shell-fm client and a program called tee. This is essentially me linking to someone else's information, but I put it in a few useful contexts. Click through to read the full post.

You should read this if any of the following apply:

  • you appreciate free music, especially via some cool linux hacks
  • you want to passively generate a potentially massive music library in mp3 format
  • to not only listen to, but also simultaneously download great potential mixtape songs that you've never heard before
  • somewhat random, yet full access to the entire secure last.fm catalogue of mp3s
  • to become part of a tiny minority of power users leveraging a great service for a novel purpose

Many of us listen to enormous quantities of music these days. Those of us who are smart and cautious tend to back this music up on external hard drives. Sometimes, multiple redundant hard drives. Some of us are smart, but not cautious. We have plenty of music, but it isn't stored with the worst case scenario in mind. My hard drives crashed in September, right after I moved 500 miles away from home, to live in Columbus, Ohio. Shortly thereafter, I found a hack here that allowed me to re-generate my music library using my last.fm profile data and the last.fm service. No hard work necessary. Listen to music; the collection builds itself.

About a year ago, I wrote about shell-fm, a lightweight Last.FM client for Linux. It's still pretty much the best thing going when it comes to console-based Last.FM clients. Being that it's just a little console app, it's a lot less bloated than the official last.fm app. And personally, I think it's better looking.

The command follows. There's a far more sophisticated version of this available at the external link now, that actually tags the file as it downloads. I suggest you go and get that one.
extern = tee "/home/noah/sapphires/%a - %t.mp3" | aoss madplay -Q -
With this, I generated a gigabyte of music over 3 days of casual listening. Over 300 songs, with many of them among my favorite songs. How else would I get this so easily?

Why would you want this?
  • You can regenerate a music library from music you've already scrobbled, but might not have access to.
  • You're like me in that when someone asks you to make them a mixtape, you never know what to put on it because your musical taste is so broad. Your Last.fm profile is pretty well fleshed out, so just run shell-fm with this script for as long as you want the mixtape to be, on the library station for your username, and then burn the mp3s to disc.
  • See above for more reasons.

Where this doesn't work: with filenames that have special characters. Artists who have filenames like GZA/Genius won't get written to disk because it confuses tee. tee interprets this as a directory instead of a filename because of the slash. Here's an example of a bad songname: Heard Iron Bug, "They're Coming To Town". The quotes in the song name also confuse tee. This may be corrected in the newer version discussed briefly above and linked to throughout this post, but I haven't finished testing it out yet.

Lastly, in light of the Last.fm user data scare, I feel I should mention Libre.fm, an open alternative to Last.fm. It's in the alpha stage of testing and will even import your user data via this scraping utility.

21 comments:

Unknown said...

My understanding is that Last.fm handed over data to its parent company upon request, and was only told it was for the RIAA after the information had changed hands.

Anonymous said...

You can import your data from last.fm to libre.fm using a python script they have. Here's the page on their wiki: http://ideas.libre.fm/index.php/Using_lastscrape

Noah said...

Thanks anonymous, updating post.

Anonymous said...

That rumor was a lie. They never handed data over to the RIAA.

http://blog.last.fm/2009/02/23/techcrunch-are-full-of-shit

Anonymous said...

(I'm a developer at Last.fm)

The data-scare rumour is bollocks. Last.fm denied it (twice), CBS denied it, even the RIAA denied it. TC based their story on an anonymous source, who since publication has cut all contact and disappeared.

Don't believe everything you read on the internet. I wouldn't say it's a fair reason to "abuse" Last.fm, that said shell-fm is pretty neat.

Noah said...

Yeah, I guess abuse was something of a strong word and not necessarily what I intended. When I found this hack, my intent was to use it to get me out of the fairly common situation I described above, that i found myself in last September.

If you happen to check back, I have a question: how does last.fm get these files in the first place? I imagine a significant portion are from licensing agreements. I am aware that it collects meta data about a track but does it ever collect actual tracks from users?

Tax Accountants Victoria BC said...

Very nicely done and I truly enjoy it.

Tax Accountants Victoria BC

Unknown said...

Great post! I appreciate you for the effort you take to share your knowledge with people. I can find many things that are still unaware. Thanks for you time and knowledge. Great!!!headphones melbourne.

Unknown said...

Thanks so much for the information. I appreciate it a lotfurniture repairs melbourne.

Unknown said...

I reread some of your blogs because I love the infos posted.
You are amazing Garden design.

Unknown said...

Among the best sites I have come across in a while.weeding.

Unknown said...

The information that you give thru blogging is very useful. keep it up!bricklaying melbourne.

Unknown said...

This article has given a very good amount of information on this amazing topic. The writer has done a good amount of research on this topic and has written it very well.Pet sitting.

Unknown said...

This article has given a very good amount of information on this amazing topic. The writer has done a good amount of research on this topic and has written it very well.Roof cleaning.

Unknown said...

Good post Thanks for sharing with us. I just loved your way of presentation. I enjoyed reading this Paving.

Unknown said...

I am continually hunting on the web down articles that can help me. There is clearly a great deal to think about this. I think you made some great focuses in Features too. Continue working, extraordinary job
car wash

Unknown said...

Very good article, I enjoyed reading your post, very good part, I want to tweet this to my followers. Thank you
retaining walls

Unknown said...

Great post and nice blog shared here.Its an beautiful Content. Great article and thanks for sharing this post. Share some content on
masseuss

Unknown said...

This is really a nice and informative, containing all the information and also has a big impact on the new technology. Thanks for sharing. Drywall contractor near me

Unknown said...

I just couldn't leave your website before telling you that I truly enjoyed the top quality info you present to your visitors? Will be back again frequently to check up on new posts.
Santa Rosa Landscaping

Unknown said...

I am continually hunting on the web down articles that can help me. There is clearly a great deal to think about this. I think you made some great focuses in Features too. Continue working, extraordinary job
Santa Rosa Cleaning service

Post a Comment