Soma.fm + Spotify + import.io + Python mashup: automatically create a Spotify playlist with Soma.fm tracks

Posted on Sun 12 July 2015 in Python • Tagged with import.io, music, Python, soma.fm, spotify

I'm a big fan of Soma.fm (a 25+ channels streaming radio based in San Francisco) and during the years I've been writing clients for this radio for different mobile platforms (Maemo, MeeGo, Harmattan, Windows Phone, BlackBerry 10, Jolla). I love in particular their "Indie Pop Rock" channel that during these years made me discover some very good artists.

When Spotify finally was available in Italy (I'm still using it right now that I live in the UK), something that I always missed was a radio with the same good music. Why not just listening to Soma.fm? Because I like to listen to the music while I commute and in the London Underground it's nearly impossible to have signal.

So I was thinking: it would be nice to have a Spotify playlist with Soma.fm tracks. Wait a moment.... I can do it!

Frankenstein_Jr_Mel_Brooks_1974

Soma.fm publishes the tracks history with all the tracks streamed during the last hour http://somafm.com/indiepop/songhistory.html so I just needed something to parse this list for me and return me a well formatted version.

Thanks to import.io (it's a service that takes a web page as input, parse the data and generates a RESTful API to access this data) I was able to easily get the data I needed. At this point I only needed to be able to loop through the list, search each track on Spotify and add it to my playlist.

The source code is fully available here https://github.com/andreagrandi/spotisoma

Note: you can't just get the code and run it. You will need to get your own import.io api key, generate your import.io api url, get a Spotify application key (the old/deprecated one, since it was nearly impossible for me to use oauth in a simple Python script due to the fact I didn't have an endpoint to receive the token back. You can get more informations here: https://pyspotify.mopidy.com/en/latest/quickstart/#application-keys) and set your env variables with your Spotify username and password. Last but not least: the old Spotify library only works with Premium accounts.


Announcing mSoma: Maemo/MeeGo client for SomaFM

Posted on Sat 03 July 2010 in Linux, Maemo (EN), MeeGo, Qt, Recensione • Tagged with maemo, MeeGo, N900, nokia, Qt, SomaFM

SomaFM is a streaming radio with near 16 different channels, available for free. Even if it's possible to copy-paste their streaming URLs to N900 Media Player, we (me and Lorenzo Bettini) decided to create a custom application, to make channels switching easier for the end user and to be able to add more features. We decided to take advantage of the new Nokia SDK and write the application in Qt/C++. Source code is available on Gitorious and it's always updated with latest version we're working on. If someone want to test the application, it's available in extras-devel repository  ("msoma" under Multimedia section) of N900.

msoma

The UI is still in development as you can see. The application is already usable, but of course we have to work hard on the user interface. Feel free to test/use it and send us any feedback. If you want to contribute to our project (coders are welcome) please send us a patch with your code or ask us to be added to mSoma development team in Gitorious.