»Heavy Rotation« - Your top album in the last week
»Heavy Rotation« - Your top album in the last week
Some of you might know the wonderful software Last.fm, which collects your music listening behaviour and provides useful statistics like weekly personal charts, overall track and artist top lists and similiar stuff like that. But beneath the data they are displaying on there website they provide a useful REST-based API which provides statistics in a machine readable format. This is what serendipity_plugin_heavyrotation is based on. To keep it short: it displays the cover of the top-album of the last week, for those who knows this is often called »heavy rotation« when it comes to broadcast terms.
All you need is to install the plugin via Spartacus, supplying your Last.fm-username and an Amazon API-key (Amazon is used to fetch the covers). You can see the plugin in action there.
WARNING: This plugin works only with PHP 5.1 since I like to use sensible OO-features, which are just provided by PHP 5.1. I'm focusing on maintainability and clean code, so I'm sorry if your hoster is not willing to provide you the needed environment.
Great idea, some suggestions however:
a) We already have an "audioscrobbler" plugin (last.fm bought audioscrobbler some time ago), and a few weeks ago someone already announced a "last.fm" plugin - though with a different set of features. Would it be possible to merge all these plugins into one?
b) About the Amazon API key: Would it be possbile to provide a default API key for users that don't want to register as a dev with Amazon? I know some applications that do this, so it seems to be ok with Amazon.
Apart from that I really like it, even if I can't use it because of my provider
a) We already have an "audioscrobbler" plugin (last.fm bought audioscrobbler some time ago), and a few weeks ago someone already announced a "last.fm" plugin - though with a different set of features. Would it be possible to merge all these plugins into one?
b) About the Amazon API key: Would it be possbile to provide a default API key for users that don't want to register as a dev with Amazon? I know some applications that do this, so it seems to be ok with Amazon.
Apart from that I really like it, even if I can't use it because of my provider
Yeah, if it was that easy ... I've already got myself webspace from a different provider exactly because of PHP5. But I'm not happy with the new one either because of a few other shortcomings, and because PHP5 only runs as cgi ... bummer. Right now I'm thinking about switching to a dedicated server.mastaYoda wrote:And, btw: change the provider
And about sharing libraries: I absolutely second that! Not only for PHP libs, but maybe javascript/ajax, too. But I also think that, at least in spartacus, we should try to keep the number of plugins as low as possible.
Yes, Garvin is always concerned about keeping the number of plugins low to avoid confusion. We generally prefer few all-in-one plugins (Windows way) to lots of little plugins that work together (Unix way).
You can still use the Unix way in your plugin programming, just not as separate plugins themselves. Or you can host your own plugins if Garvin won't allow them into SPARTACUS.
You can still use the Unix way in your plugin programming, just not as separate plugins themselves. Or you can host your own plugins if Garvin won't allow them into SPARTACUS.
It would be nice to mention the requirement of PHP-5.x in Spartacus to not confuse users that don't read here every day.
Visit Hokeys Blog!
Sorry, my mistake. I meant the plugin-page of s9y where a hint regarding PHP 5.1 is missing:
I think it could be useful to mention this in the plugin-description, so that non PHP5.1 users (like me ) know where the error messages come from.
I think it could be useful to mention this in the plugin-description, so that non PHP5.1 users (like me ) know where the error messages come from.
Visit Hokeys Blog!
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
I thought it were implemented, but evidently the requirement check for PHP fails when using spartacus - only locally downloaded plugins are checked for the requirements.
So the spartacus plugin needs some attention *g*
Best regards,
Garvin
I thought it were implemented, but evidently the requirement check for PHP fails when using spartacus - only locally downloaded plugins are checked for the requirements.
So the spartacus plugin needs some attention *g*
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Getting the following error, any idea why? I have filled out all the settings correctly!
Code: Select all
Fatal error: Uncaught exception 'serendipity_plugin_heavyrotation_albumhandler_chickeneggproblem' with message 'Could not read image from a file. Error was: File /home/matthew/public_html/templates_c/serendipity_plugin_heavyrotation.txt does not exists' in /home/matthew/public_html/plugins/serendipity_plugin_heavyrotation/lib/albumhandler.php:208 Stack trace: #0 /home/matthew/public_html/plugins/serendipity_plugin_heavyrotation/plugin.inc.php(137): serendipity_plugin_heavyrotation_albumhandler->getInstance() #1 /home/matthew/public_html/include/plugin_api.inc.php(836): serendipity_plugin_heavyrotation->generate_content('On ??Heavy Rota...') #2 /home/matthew/public_html/include/functions_smarty.inc.php(514): serendipity_plugin_api::generate_plugins('right') #3 /home/matthew/public_html/templates_c/freshy^%%71^713^713F0509%%index.tpl.php(152): serendipity_smarty_printSidebar(Array, Object(Smarty)) #4 /home/matthew/public_html/bundled-libs/Smarty/libs/Smarty.class.php(1258): include('/home/matthew/p...') #5 /home/matthew/pub in /home/matthew/public_html/plugins/serendipity_plugin_heavyrotation/lib/albumhandler.php on line 208
Re: »Heavy Rotation« - Your top album in the last week
The sidebar plugin on my blog only updates the picture every few months. Could this be some sort of caching issue? I have checked the query to last.fm, and the server returns correct (updated) stats when I manually request it ( http://ws.audioscrobbler.com/1.0/user/.../weeklyalbumchart.xml )