Author Topic: custom web link not split  (Read 978 times)

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3840
  • MB Version: 3.6.8878 P
When I have an album with a main artist + guest artist or 2 main artists that I have tagged with MusicBrainz artist Id's
I have set up the custom web link editor to remove the extra Id's and leave only the first one for the link:
Code
$IsNull(<M.Brainz Artist Id>,,$If($Contains(<M.Brainz Artist Id>,";")="T",https://musicbrainz.org/artist/$Split(<M.Brainz Artist Id>,";",1),https://musicbrainz.org/artist/<M.Brainz Artist Id>))

This works fine when I select "Preview" but when I click the generated link in track info panel, the info has not been split:
Code
https://musicbrainz.org/artist/6b064ead-91a4-4ac8-8076-b1febe4f4aac; bd53f9a7-8be9-46b0-bf7d-1deea3cb57bc
MusicBee and my library - Making bee-utiful music together

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34364
its due to escaping of the url so its suitable as a web-link. I dont think i will have a general solution but this should work:
Code
$IsNull(<M.Brainz Artist Id>,,$If($Contains(<M.Brainz Artist Id>,";")="T",https://musicbrainz.org/artist/$Split(<M.Brainz Artist Id>,"%3B",1),https://musicbrainz.org/artist/<M.Brainz Artist Id>))

Bee-liever

  • Member
  • Sr. Member
  • *****
  • Posts: 3840
  • MB Version: 3.6.8878 P
Yep. It works, thank you!
And with that info, I was able to get the secondary link to show using
Code
$IsNull(<M.Brainz Artist Id>,,$If($Contains(<M.Brainz Artist Id>,"; ")="T",https://musicbrainz.org/artist/$Split(<M.Brainz Artist Id>,"%3B%20",2),))
MusicBee and my library - Making bee-utiful music together