Author Topic: Last.fm playing track data  (Read 36440 times)

Thorbjorn

  • Guest
This isn't actually a plugin, but didn't know where else to put it.

I was inspired by Stevens new Last.fm plugin and wanted to make something that updates by itself. I made this web page that uses the playing track to search last.fm for top artist tracks, related artists and similar tracks. Clicking on an entry will locate it in the library if it exist.

To use it just paste this link into the displayed tabs:
http://lastfm.host-ed.me/?&artist=<Artist>&track=<Title>

Example:
http://lastfm.host-ed.me/?artist=kaizers%20orchestra&track=prosessen

Optional extra parameters:
number=x              how many results you want to show (default = 5)
bg=xxxxxx               html color code of page background (without the #)
font=xxxxxx            html color code of font and links
hover=xxxxxx          html color code of hover bg
last=1                      Show last.fm icon with link for each entry
spot=1                    Show spotify icon with link for each entry found (slows down the page a bit)

Example:
http://lastfm.host-ed.me/?artist=kvelertak&track=blodt%C3%B8rst&number=9&bg=000000&font=ffffff&hover=b10000&last=1&spot=1

I put it up on a free host, so if it goes down it probably exceeded the traffic limit.

Looks like this so far:
Last Edit: September 22, 2012, 04:08:26 PM by Thorbjorn

Thorbjorn

  • Guest
An improvement would of course be if it could link to a track in the musicbee database if it was there, but I'm guessing that's not possible from a webpage, and I have no idea how to make a plugin. Feel free to do so if anyone knows/wants, I would love that feature :)

lnminente

  • Sr. Member
  • ****
  • Posts: 1049
That's very nice! I have added it as a new tab inside the Playing track tab :)


beeing good

  • Guest
That's very nice! I have added it as a new tab inside the Playing track tab :)

Same here, works really well.

Would be great if it could link to the musicbee library though.

Thorbjorn

  • Guest
I added some parameters to change colors. The original colors were just to fit with my skin.

The minimum syntax you need is:
http://lastfm.host-ed.me/?artist=<Artist>&track=<Title>

Optional extra parameters:
number=x              how many results you want to show (default = 5)
bg=xxxxxx               html color code of page background (without the #)
font=xxxxxx            html color code of font and links
hover=xxxxxx          html color code of hover bg

Example:
http://lastfm.host-ed.me/?artist=kvelertak&track=blodt%C3%B8rst&number=9&bg=000000&font=ffffff&hover=b10000

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
An improvement would of course be if it could link to a track in the musicbee database if it was there, but I'm guessing that's not possible from a webpage, and I have no idea how to make a plugin. Feel free to do so if anyone knows/wants, I would love that feature :)
what do you mean by link to a track? If you mean on clicking the link it navigated the main panel to select that track, then yes something could be done. You would set the link to be something like:
track://artistname;title
and MB would intercept that when clicked

Thorbjorn

  • Guest
Yes that's exactly what I mean. I tried what you said now (track://Archive;Again), but I got a popup that said "track is not a registered protocol". Did you mean this could be implemented, but is not now? Would be awesome if this is possible. I didn't think it would be.

lnminente

  • Sr. Member
  • ****
  • Posts: 1049
(Thanks, nicer now. For the skin metrocolours.red i'm using http://lastfm.host-ed.me/?artist=<Artist>&track=<Title>&bg=22282a&font=fbffc7&hover=a8001f )

Edit: The result is here http://s16.postimage.org/ao727n6bp/Untitled.png
Last Edit: July 17, 2012, 11:23:33 PM by lnminente

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
i've added support for this protocol on web-links:
musicbee://artist=xxxx&title=yyyy

if xxxx or yyyy contain a "&" (or any html escape characters) then it needs to be hex encoded

at the moment it filters the library for that artist and title.
it will be in the next update


Thorbjorn

  • Guest
Awesome, but sadly I can't get it to work here. I get a popup with "musicbee is not a registered protocol". It's not because I use a portable version?

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
here is an example
http://musicbee.niblseed.com/Debug/test.htm


<a href="musicbee:artist=Bon%20Jovi&title=Always">test</a>

Thorbjorn

  • Guest
That works! I used the example you posted earlier with musicbee://artist=xxxx&title=yyyy
Without the // it works fine.

I found a bug though. When in artwork view it correctly selects the album/artist containing the song, but if I'm already viewing an album/artist, nothing happens when I press the link. Same thing happens if I have the "switch to Album and Tracks view when drilling down" option selected.

Thorbjorn

  • Guest
I uploaded a new version now with the new MB link. I put spotify and last.fm links with their icons next to the song/artist. I also reduced the font size a bit to fit better with the MusicBee font.



http://lastfm.host-ed.me/?artist=nneka&track=focus&number=10

I tried hex encoding the url and it looks fine, but I don't have MusicBee here so I can't test if it works. I'm going on vacation in a few hours so won't be able to fix anything for a while.

lnminente

  • Sr. Member
  • ****
  • Posts: 1049
Thorbjorn, it works really well. Very useful for knowing which good tracks are missing in our libraries :)

Steven, when only the artist is sent in the musicbee link, but not the title of the track could we do a filtering of that artist the same than when we middle clicking the artist name? Currently i have it sorted by playcount and realized it only goes to the first track of that artist. TIA

BTW Would be nice having this as a local plugin