Quantcast
Channel: andrewBridge » Functionality
Viewing all articles
Browse latest Browse all 11

List Scrobbling bookmarklet

$
0
0

A few weeks ago, I introduced a bookmarklet that I’d created for Auto-scrobbling BBC Radio using the brilliant web app, Universal Scrobbler. Since then, I’ve been using the bookmarklet myself pretty regularly! It’s been very useful at work and so far I’ve not seen a bug (UI improvements maybe, but not actual bug!).

But there is still a problem, sometimes I don’t listen to the radio live, as it broadcasts. The BBC iPlayer is a brilliant service and I often use it to listen to shows that I would otherwise have missed altogether. But because there’s no live broadcast, there’s also no live track update. This means that, should I want to, I can’t scrobble the music I’m listening to! Looking on the feature requests on the web app’s forum, it’s been wished for in some form or another, by a majority of the community of users posting.

My newest bookmarklet sets out to solve this problem in part. For my specific scenario, I have solved it as much as I can with just the frontend to play with. It is now possible to go to the tracklisting of any BBC radio show, and get two batches of JSON code, one with all the artist names, the other with all the track names. This is very specific to the BBC website and the current layout they’re using, but that’s the instability that comes with bookmarklets which are relying on consistencies within the DOM.

The thing that may interest more people is the second half of the process, which happens on the Universal Scrobbler site itself. When the bookmarklet detects that it’s being run on the site, a box will appear with two text boxes to enter two batches of JSON code, this (if parsed correctly) will then allow for a batch scrobble operation to begin, using pre-existing features of the site.

It’s certainly not a perfect solution, but it’s pretty close. And it means that any JSON code can be entered into the two boxes, meaning playlist scrobbling is more of a possibility! Further to this, the bookmarklet is extendable, with the possibility of other sites being support to allow scrobbling from them as well!

As with the auto-scrobbling bookmark, I haven’t tested this. I know it won’t work on IE7 or below, there’s a few properties used for positioning of the UI that may not be supported in certain other browsers, but I’m not sure. Try it in a modern browser, and you should find it works! To get it, just click the link below and follow the simple instructions.

Universal Scrobbler :: List Scrobbler

Once you’ve done that, the bookmarklet works differently depending on where you are. If you’re on a BBC page, for a radio programme (I’d assume it’d work for ones that are live and updating their track listing as they go too!), clicking the bookmarklet will grab all the tracks it can find, show a white box in the middle of the page and give you the artist and track details in JSON code. If you’re on the Universal Scrobbler site, a similar white box will appear in the middle of the page and you can put JSON code into the two boxes it contains. When you click “Scrobble All”, it will visibly begin scrobbling (if it doesn’t something’s wrong!), once it’s finished, the box will disappear and you’ll see a confirmation message.

Hopefully something here will be useful for someone else to enjoy too!

Useful Links

 Universal Scrobbler

 Universal Scrobbler Last.Fm group page

 Universal Scrobbler’s creator on Last.Fm, OnDistantShores



Viewing all articles
Browse latest Browse all 11

Trending Articles