Sometimes you just get an idea and cannot sit still until you followed it through. Yesterday I had an idea while showering:
Over the holidays I was in Austria & I frequently listened to Radio FM4. I really liked it for discovering all the new music, but I didn't really like the ads, people talking and not being able to skip a song. So my idea was a cronjob that gets the recently played songs from their website and puts them on a Spotify playlist.
With my hair still wet I researched the possibilities of Spotify's API and realized they got everything I need! Soon the first prototype in node.js was ready. After some frustrating fiddling with oAuth I added the first tracks via my script.
Version 1.0
Then I realized Spotify doesn't check for duplicates. So I also implemented a duplicate check myself. I noticed that Spotify's search sometimes returns fuzzy results. So I also tried to prevent adding some strange versions of the songs by comparing the artist & title information from Spotify with what I searched for.
I was quite happy with my version 1.0, installed it on my server and set up a cronjob. The result was this playlist. It is public, so anybody can subscribe & my cronjob adds new tracks every 20 minutes.
Version 2.0
While my first playlist was filling itself, I already was thinking about the obvious next step: If I can do this for one radio station, I can do this for any radio station.
Two hours later I released Version 2 with configurable radio station and used it to create another playlist of my second favorite radio station.
Open Source
I released the code under MIT license, so anyone can use it to crawl his favorite radio station. Here you find the project page.