Amarok recently liked


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
Archives
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| -3 | -2 | -1 | 0 | 1 | 2 | 3 |
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |



Comments
Post new comment