If you hadn’t noticed this site makes use of an awesome Last.fm recent playlist scrobbler called Last.fm RPS by Taha Paksu. I’m guessing it’s an old project as it’s not seen much development for years but it’s one of the nicest playlist widgets I’ve come across as to features and display options.
Anyway, I’ve used it for years but over the last few whenever I’d play a track that it couldn’t pull the album art for it kept screwing up and displaying the below error text. Most songs it happily finds but for more obscure artists or especially any Anime OSTs or ED/OPs good luck!
Warning: file_get_contents(http://ws.audioscrobbler.com/1.0/artist/Stitched+Up+Heart/similar.xml): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /homepages/wp-content/plugins/lastfm-rps/simplexml.class.php on line 46
This has been a long running annoyance for me as it always bugged me given it screwed up the nice tidy layout and display of tracks – I know I know, minor stuff really!
*Disclaimer* I’m far from a developer or coder but have messed about with various bits for so long now I’m happy to pull it apart, figure it out and make changes as needed.
So if anyone else uses this plugin and has the some error the below fixed it perfectly for me –
- Open up the lastfm.php file
- Line 295 looks to contain the (I’d assume) now defunct URL –
PHP1$url = "http://ws.audioscrobbler.com/1.0/artist/".$artist."/similar.xml";
- Replace this with –
PHP1$url = "http://ws.audioscrobbler.com/2.0/?method=artist.getsimilar&artist=".$artist."&api_key=2f1a09f6bb6c9d4a89c67c7a7805a215";
- Test some of the problem song tracks and you should be good to go!