Me again

Way back at the start of the year I asked about the following:

annoyingmouse wrote: 
> Does anyone know if it would be possible to do some sort of
> firefox/chrome plugin for a "send to squeezebox/band's campout" option
> on Bandcamp pages?  Pure laziness on my part but I was just interested. 
> (Obviously, it's sooooo hard to load up a controller and search!!!)

Sadly there was no solution given (though as always the replies were
nonetheless appreciated) and much as I have no idea how to do plugins
like I asked about I've had a bit of a play around and, in case anyone
is interested, I worked out a little bookmarklet you can add to your
browser (tested in Firefox and Chrome) which you can click whilst on a
bandcamp page and load up the artist or label's releases.  It's not the
prettiest solution but I post it in the hope somebody can refine or
improve it or make a suggestion.  It's based around the search function,
which doesn't always (at least for me) come up with results without
exact entry of artist or label so take that into account when you're
confused by it.  All you need to do is copy and paste the below into a
bookmark replacing the ip details


Code:
--------------------
    javascript: t=document.getElementsByTagName("meta"); s=""; 
for(i=0;i<t.length;i++){for(x=0;x<2;x++){if(t[i].attributes[x].value=="og:site_name")
 s=t[i].content;}}; if(s=="") alert("No name available"); else 
window.open("http://<LMSIP>:<PORT>/plugins/bandcamp/index.html?index=10_"+s+".0");void(0)
--------------------


where <LMSIP> should be your server IP and <PORT> your port (as used in
the web ui access).  I've only tried with one player connected and it's
working for me but you can also add your player mac address using a
"player=<MACADDRESS>&" added after the ".html?" part if you want to be
(presumably) more specific

I should stress here that I'm not entirely confident with javascript (or
any other scripting for that matter) so this was a lot of looking around
for this and that to get what I wanted and as such I can't say much for
it's reliability though as I say it is working for me.  I'll mention
also that the reason for all the awkward coding, etc. is that the
correct reference for searching is stored in the "og:site_name" meta
tag.


------------------------------------------------------------------------
annoyingmouse's Profile: http://forums.slimdevices.com/member.php?userid=49704
View this thread: http://forums.slimdevices.com/showthread.php?t=90950

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to