Author Topic: Links Displayed on current track playing  (Read 1844 times)

npolj89

  • Newbie
  • *
  • Posts: 14
Hi there,

So I just noticed this feature and it's great.  Is it possible to customize it so different links appear depending on the track of an artist that is currently playing?

Like for linkin park I have the wikipedia artist profile, a link to genius lyrics, linkinpark.com and lpunderground.com.  I don't want the last two to show up for any artist except linkin park, however, they are currently showing up for every artist.  Is there a way to change that?

Thanks in advance.

hiccup

  • Sr. Member
  • ****
  • Posts: 7790
I don't think that can be done at this moment.
As an alternative, you could setup a custom weblink like:

Homepage
Code
$If(<Artist>="Linkin Park",http://linkinpark.com,http://www.google.com/search?q=official website <Artist>)
For Linkin Park it will lead directly to the website you mentioned, and for all other artists it will open a google page where the homepage of the artist is likely to be one of the top results. Could be a useful alternative option?

A random thought on perhaps taking this further:
If you have more artists that you want to have a direct link for, I think you should be able to use a dedicated tag that you populate with the specific webpage you want to link to that artist.
Then you could change the formula above to have it navigate to such a specific website using the url information in that tag, or if the tag is empty/absent, do the google thingy.

You'll have to test if that will indeed work. www-url's can sometimes pose problems when used in tags and/or formulas.
Last Edit: May 27, 2021, 12:30:54 PM by hiccup

hiccup

  • Sr. Member
  • ****
  • Posts: 7790
I gave it a quick test, and the second alternative solution does work.
What is important, is not to write the full url in the tag, but only the part that comes after 'http//'

You could e.g. use the tag 'origin' for this, and then use this as the formula for the weblink:
Code
$IsNull(<Origin>,http://www.google.com/search?q=official website <Artist>,http://<Origin>)


npolj89

  • Newbie
  • *
  • Posts: 14
I don't think that can be done at this moment.
As an alternative, you could setup a custom weblink like:

Homepage
Code
$If(<Artist>="Linkin Park",http://linkinpark.com,http://www.google.com/search?q=official website <Artist>)
For Linkin Park it will lead directly to the website you mentioned, and for all other artists it will open a google page where the homepage of the artist is likely to be one of the top results. Could be a useful alternative option?

A random thought on perhaps taking this further:
If you have more artists that you want to have a direct link for, I think you should be able to use a dedicated tag that you populate with the specific webpage you want to link to that artist.
Then you could change the formula above to have it navigate to such a specific website using the url information in that tag, or if the tag is empty/absent, do the google thingy.

You'll have to test if that will indeed work. www-url's can sometimes pose problems when used in tags and/or formulas.

Thanks for the suggestion and help.

Could you expand further on that tag option?  I have a few artists maybe 5-10 that I would like it to go to an url that I provide.

I'm very new to musicbee so I don't quite understand what to code and where to put it lol

npolj89

  • Newbie
  • *
  • Posts: 14
I gave it a quick test, and the second alternative solution does work.
What is important, is not to write the full url in the tag, but only the part that comes after 'http//'

You could e.g. use the tag 'origin' for this, and then use this as the formula for the weblink:
Code
$IsNull(<Origin>,http://www.google.com/search?q=official website <Artist>,http://<Origin>)



Also how would I get it displayed on the right side with track information?  Instead of the 4 links I originally put.

hiccup

  • Sr. Member
  • ****
  • Posts: 7790
Could you post a screenshot of how you created the links you are currently using and how they show up in your MusicBee panel?

npolj89

  • Newbie
  • *
  • Posts: 14




Sorry for the quality.  Basically right now theres no way for the program to understand when a different artist is playing and t o provide a different link.

hiccup

  • Sr. Member
  • ****
  • Posts: 7790
I see, you've got the basics right already.

Just add a new slot to your two existing custom web links.
name:       homepage (or whatever you like)
web-link:  the formula that I posted in my previous post

Activate it using the checkbox, same as you did for the other two.
Then populate the 'origin' tag for a Linkin Park song exactly as I showed in reply #3.
(= reply #2 if you are logged-out of the forum. Yeah, I know…)

Now if you click the 'homepage' link in the right panel the magic should happen.

(edit, I just read your last sentence at the bottom; are you aware you can switch the 'track information' panel between 'selected' and 'now playing'?)
Last Edit: May 27, 2021, 05:00:09 PM by hiccup

npolj89

  • Newbie
  • *
  • Posts: 14
I was not aware no so thanks for that!

I'm about to try doing the code stuff you suggested.  I'm not quite sure I understand it all but I will try my best.

npolj89

  • Newbie
  • *
  • Posts: 14
Ok it works.  Now is there a way to add a 2nd artist and their corresponding website to that same code?  IE if artist = linkin park then linkinpark.com, if artist = Staind then staind.com, if artist = trapt then trapt.com and so on so forth?  I tried adding it but without any basic knowledge of code im obviously missing characters.

hiccup

  • Sr. Member
  • ****
  • Posts: 7790
The idea behind this solution is that you don't need to change the formula for any subsequent artists you want to add.
Just select all the albums/tracks of an artist, e.g Staind, and then fill the 'origin' tag with 'staind.com'

(again, see my reply #2 (#3 if  you are logged-in) and look at the screenshot)

The formula checks if the 'origin' tag has a value and will then use it.
If the tag is empty it will open the google search page.

npolj89

  • Newbie
  • *
  • Posts: 14
Thank you for all the help.  Everything you suggested worked perfectly.  This program is incredible!