Amarok recently liked

in
recently-liked
amarok

The “Recently liked” section in the right sidebar is generated hourly. Amarok stores all the collection/rating data in a MySQL DB. This makes it possible to pull up the most recent songs that I rated 4/5 stars or above. Last.fm’s api is used to create the links.

Check the “run.sh” script to see how it’s all put together.

The json-to-atom script is using a UUID seed that I randomly generated using uuid.uuid4() in python. Since there are no links for any of the items, the <id> elements are generated using the artist/track names and this UUID seed.

If you’re interested, you can get the code using bazaar like so:

bzr branch http://glyphy.com/bzr/amarok-top-rated

If you end up using some of the code, please change the last.fm API key. You can easily generate your own. Also change the UUID seed in json-to-atom.py.

TODO

  • add images
  • record the items already seen to prevent hitting last.fm’s servers more than necessary

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Syndicate content