Assisted by Alien Technology™
This project is hosted on github.
Mouseless geeks already know what it’s missing from this picture.
If the player is already running, Fn-F5 (play) will toggle the play/pause status of the player. Otherwise you can select what to play:
I’ve selected to play a single artist in this case. Then, I need to select an artist name, either be navigating the given list or typing part of it’s name. The list is nicely filtered, courtesy of StumpWM’s input message boxes. A similar effect can be achieved with dmenu, for example.
After that, the top songs from the selected artist, according to last.fm top tracks list, start playing, one after another. You can see what is currently playing with another keybinding.
Other possibilities are available, like playing a single song based on some quick lyrics search: input a keyword and then filter the results. Hit enter, and Aerosmith is playing now.
It works, but it’s buggy, so this is not officially released. In the meantime, there are some ideas for improvement. If you have any, you can open a ticket or mail me.
First, adding the option to also play local files would be useful. That would mean a more responsive app since it doesn’t depend on last.fm and youtube and it also means you can play your flac files if you’re so inclined.
Besides last.fm favorites lists, info regarding top songs, or albums from other sites can be used to create playable lists. For example, metalstorm has these lists based on user rating, like “best albums in this genre”, “best albums of 1999” or “best 200 albums of all time” and these sort of things. The albums info is already available on last.fm. That means it should be possible to shuffle play all the songs on these 200 albums by selecting the “best 200 albums according to metalstorm” list in the playlist selection (see first gif). That would be a nice and lazy way to discover new songs.
On the other hand, downloading and parsing a new artist from last.fm takes a long time (seconds). Maybe using the last.fm API directly would speed up things a bit as it would also mean making fewer calls to last.fm in the first place. There is a cl-lastfm package for Common Lisp but I haven’t tried it and it also seems to be in a bad shape. On the negative side, using an API would mean the users would need a last.fm account and an API key to use the player. Best case scenario: keep both implementations and for a speedup, users could use an API key.