Author Topic: Prevent Virtual tag to use semicolon as separator  (Read 1780 times)

Pai_Natal

  • Jr. Member
  • **
  • Posts: 22
I'm using a virtual tag to display the album names together with information from another tag on the column browser.
Some of the albums use semicolons in the album name (eg. Classical Music albums with multiple works).
When I used the album tag in the column browser, that wouldn't be a problem, the whole album name would be shown,
But when I try to use the virtual tag, it will interpret the semicolons as separators, a create multiple entries from the same album.
Is there a way to prevent this?

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10271
I can't put my brain on it exactly, but try with two semi-colons. Or with a slash before the semi-colon. Either forward (/) slash or back (\) slash.

I'm sure someone else knows exactly what the escape character is if my suggestions are incorrect.
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

hiccup

  • Hero Member
  • *****
  • Posts: 9119
As a brief and impulsive reply:
'Album' should not be multi value. Full stop.

Even while MusicBee allows for it, it should not be misused as such.
For classical music, consider abandoning the concept of 'albums' altogether. (there were no commercial vinyl, acrylic or digital money-maker variants at that ime)
For classical music, focusing on 'works' instead of modern day concepts such as 'albums', LPs', 'cassette tapes', 'CDs' or whatsoever is a much better approach in my opinion.
Last Edit: February 24, 2023, 11:41:05 PM by hiccup

Pai_Natal

  • Jr. Member
  • **
  • Posts: 22
I don't want the album to be multi-value, that's the thing. The semicolons are there just to separate different works on the same album (since most classical albums don't have proper names). And that's how it works for the album tag, when used on it's own. It treats the album name as a single value, even if there are semicolons in it.

But if I try to use album in a virtual tag, then the semicolons will be identified as separators for multiple values.
Is there a way to avoid this? Without having to re-tag my whole library again?
Since some fields will treat semicolons as separators and others won't, it seems strange that there's no way to decide what will be the behaviour on virtual tags.

I do use 'works' and 'grouping' for classical music too. But the album concept is still useful to keep together several works that are bundled together for some reason (same performers, a concept, whatever).

hiccup

  • Hero Member
  • *****
  • Posts: 9119
I don't want the album to be multi-value, that's the thing.
Some of the albums use semicolons in the album name
I'll try to understand and address the contradictions in these two quotes better when (if) my mind is a bit clearer.

Pai_Natal

  • Jr. Member
  • **
  • Posts: 22
It's quite simple, really.
Semicolons are used as multi-value separators for tags, but before that they were used as separators in common written language.
That's how I use them in the album tag. Not to separate different values that should be split apart, but as a separator for reading.
It occurs mostly with Classical music, but not only. For example, a cd that reissues two LP albums together, the album tag will include both album names separated by a semicolon.

And by default, MusicBee understands that. It doesn't split names with semicolons in the album tag (like it does with the Artist tag, for example).

The problem only occurs when I try to use the album tag to generate a virtual tag.
I hope it is clear now.

hiccup

  • Hero Member
  • *****
  • Posts: 9119
It's quite simple, really.
Semicolons are used as multi-value separators for tags, but before that they were used as separators in common written language.
I don't understand what you are trying to bring across here.
'before that' and 'common written language' to me seems irrelevant and non-descriptive to be of any use here.

Quote
For example, a cd that reissues two LP albums together, the album tag will include both album names separated by a semicolon.
To repeat myself: in my opinion an album tag should NEVER be multi-value.

Quote
And by default, MusicBee understands that.
If that is the case, in my personal opinion, that is a mistake on MusicBee's behalf.
The 'Album' tag should be singular.  Never multi-value.

Pai_Natal

  • Jr. Member
  • **
  • Posts: 22
As I've said, I don't want them to be multi-value. I just want to be able to use a semicolon as part of an album name.

Here's a screenshot to make it clearer.



This is my column browser. When the column is set to Album, it displays the Album name correctly, without splitting at the semicolon.
But when I used a Virtual Tag, it will split it in two. For simplicity, I have set Virtual7 to just <Album>, and this is still happening.

If nothing else, I'm sure there's a way to write a function (for the virtual tag) to make it work, I just don't know how.
Last Edit: February 25, 2023, 01:31:51 AM by Pai_Natal

phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10271
Did you see this? And try it?

I can't put my brain on it exactly, but try with two semi-colons. Or with a slash before the semi-colon. Either forward (/) slash or back (\) slash.

I'm sure someone else knows exactly what the escape character is if my suggestions are incorrect.
Download the latest MusicBee v3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Custom Forum Search
Posting screenshots is here

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 1733
  • Heal The World
Copy and paste this to your virtual tag:

Code
$Replace(<Album>,;,;)

Edit: Forgot to add in the explanation on why it would work (depending on ur definition of work).

Computers do not recognize the second-last character in that formular as a semi-colon - they read it as a Greek question mark.
Last Edit: February 25, 2023, 09:41:11 AM by Mayibongwe
Strength and Honour (2025)

hiccup

  • Hero Member
  • *****
  • Posts: 9119
I now understand.
Also I think my brain was mixing up Album and Album Artist yesterday evening ;-)
Mayibongwe's solution seems nice.

Pai_Natal

  • Jr. Member
  • **
  • Posts: 22
Copy and paste this to your virtual tag:

Code
$Replace(<Album>,;,;)

Edit: Forgot to add in the explanation on why it would work (depending on ur definition of work).

Computers do not recognize the second-last character in that formular as a semi-colon - they read it as a Greek question mark.

It works perfectly!
Thanks

MotleyG

  • Full Member
  • ***
  • Posts: 212
As a general rule, I think it is safe practice to avoid using the common separator characters like the semicolon or slashes in any tag field. Some fields such as Album do ignore them. But if you then use this field’s info to build a new tag (Virtual, Custom, or even editing existing) errors like this can result. Alternate similar characters like the solution offered by @Mayibongwe are ideal.