Amazon Cloud Player with Last.fm Scrobbling for Greasemonkey and Chrome

Last.fm in Amazon Cloud PlayerWith Amazon Cloud Player being launched at the end of March 2011 it sparked an innovation outmatched by any others (eg: Google, Apple). Although Amazon Cloud Player has a ton of awesomeness to it already, it’s still lacking a few features. One of the features I find crucial in any music players is the ability to Last.fm Scrobble. So here you have it, brand new and released exactly one week after Amazon Cloud Player hit the market. I’ve still got a few little things to do to it, but for the most part it’s pretty snazzy.

Software Requirements

Installation Directions

  1. If you’re using Firefox you’ll fist need to install Greasemonkey if you haven’t already. If you’re using Google Chrome you’re already set.
  2. Download/Install my script* into Greasemonkey or Chrome by following the simple prompts.
  3. Go to your Amazon Cloud Player.
  4. In the top right next to Settings, Sign out, and Help you should now see “Last.fm Requires Authentication.” Click on this and grant access to my script to Scrobble for you from Last.fm. You should then be redirected back to your Amazon Cloud Player.
  5. You’re done! Enjoy. :)

* In Downloading and/or Installing my script you agree to its Privacy Notice and Terms of Use.

Sponsor Future Development


Future Improvements

  • Keyboard shortcuts to Play/Pause, Next song, Previous song
  • Show album art from Last.fm which doesn’t exist in Amazon Cloud Player
  • Update the Title Bar to show the Song Title and Artist
  • Allow you to select when it Scrobbles (50% completed, 60%, 70%, etc)

Change Log

May 3, 2011

  • Added full support for special characters: &, #, ?, etc. (Thank you Matt, Shannon, and Jessica. Sorry for the delay!)

April 11, 2011

  • Added the ability to “Love” and “Un-Love” a track from a toggleable heart icon next to the “Last.fm” text in the header of your Amazon Cloud Player.
  • The script now notifies Last.fm when you start listening to a track to display “Listening now…” in your song list on Last.fm as well as continuing to mark songs as Scrobbled after 50% completion (as before).
  • The script does a better job passing Album information to Last.fm in hopes it’ll display the proper album art for the song you’re listening to.
  • Scrobbling better accounts for when you actually started listening to a song, instead of 30 seconds from when the Scrobble took place (the “X minutes ago” should be much more accurate on Last.fm).

Requirements for a Scrobble

Because I know someone is going to ask, I’m going to put this here. These are the requirements set forth by Last.fm when posting to their servers with a Scrobble. If you don’t see your song marked as being played right away, it’s probably because you haven’t listened to it long enough.

A track should only be scrobbled when the following conditions have been met:

  • The track must be longer than 30 seconds.
  • And the track has been played for at least half its duration, or for 4 minutes (whichever occurs earlier.)

181 Comments

  1. please add this to the Google chrome web store!!!! I cannot use the extension because google blocks it every time I add it!
    thanks!

    • Hello Brandon – I apologize for my terrible delay. Thank you for letting me know that Amazon has updated their player! This script has been on my radar for a while now to rewrite, and since it is now broken I should probably get around to doing that. :)

      • Hi Daniel. I just wanted to stop by and say thank you for this script. I’ve had amazon cloud player from the beginning and I didn’t realize how much I rely on this script until amazon changed their site. Even if you don’t fix the script, I appreciate you building the original script that allowed me to scrobble all these years.

      • Hello tom – I do hope to get to it eventually. The script itself only had a handful of actual users, so I haven’t given it much attention since it stopped working. I’ve got another Last.fm scrobbler for Google Music which gets much more traffic and attention which takes up most of my side development time.

      • Yes, please do! Really wanting this, use Prime Music all day at work, missing so much scrobbling.

  2. Hi Daniel, this is awesome, and I’ll probably download it pretty soon, but first I wanted to just say I love that your name, when run together as one word could also read “Daniel’s Laughter”. I hope you are a cheerful and happy guy with a lot of laughter in your life! Keep up the good work, because music is always a way to add joy. Thanks!

    • Hello Rachel – I’m sorry to say, but the way the script is written it wouldn’t work for the Amazon Cloud Player downloadable version. I wish I could write a script for it, but it isn’t feasible at this time.

  3. I’ve installed the script on Tampermonkey, and it says it is installed, but I still have no last.fm symbol on top of the webpage, and I know for sure it is not scrobbling. I’ve tried restarting my browser and computer, but no luck. Do you have any idea how this can be fixed?

    • It seems a recent update to the Amazon Cloud Player has broken my script. I’ll take look at it as soon as I can to see if I can fix the problem, but due to my busy schedule this week I’m not exactly sure how soon that will be. You may be able to correct the issue by either refreshing Amazon Cloud Player or restarting your browser. If you have any other questions please let me know.

  4. I cant seem to get it to work. Is it possible to release a version that works for amazon uk? i tried changing the .com to .co.uk in the script to no avail?

    would be good if this would be possible

  5. Hi there, I can’t get it to install on Chrome due to extensions not being able to be added from this web page. :/
    But saying that it I see in July, it does not yet work on Amazon.co.uk anyway.

    Any news?

    • Hello – You’ll need to install Tampermonkey in Chrome before installing the script. You’re correct in that it only works on Amazon.com (not co.uk) as of date. I’ll hopefully have a chance to fix that someday.

    • Hello ry – The script does not work on iPads or mobile devices. You’d need to install Firefox or Chrome with Greasemonkey or Tampermonkey for it to work correctly. I’m not so sure the mobile browsers (Chrome/Firefox) support plugins yet. I suppose you could always give it a try and see if you can get it working.

  6. To get this working in Firefox, go into Tools-> Greasemonkey -> Manage User Scripts. Locate the Amazon Cloud Player Enhancements script and click options. Click the “Edit this User Script” button at the bottom. On lines 26 and 27, change unsafeWindow.amznMusic.customerId to unsafeWindow.amznMusic.appConfig.customerId. Save the script, and then refresh the Amazon Cloud Player window.

    • Hello Kevin – I’m in the process of entirely re-writing this script to have international support, but I do not have any idea of when that will be completed. Thank you for your recommendation for those experiencing issues with the current script. That should get them by until I have a new version out.

      • I am using the .com version of the product, and I would like to confirm that this suggestion fixed the issue I was having. Previously “Last.fm Requires Authentication” did not appear, but after making this edit it does appear.

  7. Trying to use this with Windows 7/Firefox 18.0.1
    Have greasemonkey, shows that it is on and script is installed, but nothing changes on the amazon cloud player page. I am using amazon.com in the US.

    Any ideas why it isn’t working? have tried multiple firefox restarts and logging in/out of cloud player.

    Thanks for the script!

    • Hello Kate – It appears something changed, and it is affecting multiple people right now. I’m not sure when I’ll get a chance to look into what is causing the problem, but hopefully shortly.

  8. Hi Daniel,

    I installed the firefox script for amazon uk, but it is scrobbling to someone elses account! Any ideas?

    Cheers,

    John

  9. Hi I am trying to add your amazon cloudplayer scrobbler, but google chrome won’t allow me to add it direct from here, says I have to do it through chrome settings, but can’t find your scrobbler there, please advise, cheers

  10. Could you please reset my last.fm account on your end (username mnewma)? For whatever reason my account seems to have stopped scrobbling and I’m hoping a reset fixes it.

    Thanks,
    Matt

  11. Hi Daniel, I appreciate that you are creating a cross domain version of the script, but I sign in from .co.uk but the domain of my cloud player IS the same as your one (I checked in your script, it’s exactly the same).
    I don’t know if the same is true for other Amazon sites if they forward on to the US cloud player?

      • My point being that it doesn’t use the different .x extensions it forwards you on to the amazon.com site, the URL is EXACTLY the same as the one in your script.

    • Hello kef – Just out of curiosity, are you using the US (amazom.com) version of the player? I haven’t had a chance to look into it yet, but someone else reported it not working, but this may be the reason (thank you!).

      • Yeah, I’m in the US. This is, so far as I can tell the reason it’s broken. I’d be willing to help maintain, or something.

        There are no notifications for replies on comments here, so feel free to email if you like.

  12. Hey,
    I installed your script and now I’m trying to scrobble from the german amazon cloud player web page. At first the script wasn’t even executed on amazon.de, so I changed that manually. Now I get an error message telling me the script could not identify my last.fm account. The google music script worked like a charm for me, though.
    Cheers,
    Johannes

  13. I’m using Amazon.com in the US on Firefox and am unable to get the Cloud Player to scrobble. It worked before, but no longer does. I even tried on another computer, beginning by installing Greasemonkey and then the script. It all worked perfectly but the Last.fm icon does not appear in my Cloud Player… I’d sure love to know how to scrobble again. Thanks!

  14. this does not work at all in chrome. after installing it and restarting the browser (and making sure the extension is enabled), there is no last.fm option in the top right. no change at all.

    • Hello torts – Do you access *.amazon.com from “.com”, “.in”, “.de”, or another extension? Currently the plugin only works on “.com”, but I’m working on an update which will accomodate the other extensions too.

  15. Hello Daniel,

    I might have found another bug: the album-title is not really send to last.fm. Listen to a song, click on this song at last.fm and then on the right side on the number above “scrobbels” which shows you a list with date and time you have listened to this song. It shows “null” (for the album) if I have listened to a song with the Amazon Cloud Player. Can you reproduce this bug?

    Regards,

    Thorsten

  16. Hi there. I just d/l’d your script. Works fine
    BUT
    it scrobbles to your account. Where and how can I change the last.fm account?

    thx

  17. Installed the script via drag’n’drop after downloading, but the LastFM icon does not appear at the top right kind of navigation bar.

    I tried to debug the script, but … kindly … I’m not firm enough with the things going on.

    Can you please help?

    Best regards,

    Martin

    • I’m also not seeing anything related to Last.fm in the top right of the page. I’m accessing it via amazon.com itself too.

    • But changing the two instances of “unsafeWindow.amznMusic.customerId” to “unsafeWindow.amznMusic.appConfig.customerId” like Kevin Schellenberg suggested fixes the problem!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>