Author Topic: Additional Tagging & Reporting Tools  (Read 917372 times)

boroda

  • Sr. Member
  • ****
  • Posts: 4595
Works great, but with one error - if there is comma in tag, for example:
Money, Money, Money   ->   $TransliterateToAscii(Money, Money, Money)
No Woman, No Cry   ->   $TransliterateToAscii(No Woman, No Cry)
Don't Worry, Be Happy   ->   $TransliterateToAscii(Don't Worry, Be Happy)

thank you that you noticed this important issue. actually, it was much more general and concerned much more presets than just this one. it's fixed:

https://www.mediafire.com/file/h2t08o9562efboi/mb_TagTools_latest.zip/file

p.s. no need to update presets, just update plugin.
Last Edit: May 04, 2023, 03:03:23 PM by boroda


boroda

  • Sr. Member
  • ****
  • Posts: 4595
Minor LR bug fixes, e.g. now max/min aggregated functions now can be used for string tags (earlier they correctly worked for numeric/date tags only):

https://www.mediafire.com/file/h2t08o9562efboi/mb_TagTools_latest.zip/file

Messiaen

  • Jr. Member
  • **
  • Posts: 103
Hmm... unfortunately I seem to have lost my older versions of the plugin (for testing), so I only have the newest one, but it seems one of the most recent updates broke the "\@eval[[ ... ]]" function.  Any preset which uses something like:

Code
\@eval[[$If(<Genre>=Classical,1,0)]]

...in the replace-with field results in "Invalid naming template -- $If(<Genre>=Classical,1,0)" written to the target tag... the expression itself is not evaluated, whereas it used to work as expected.

Edit: Curiously, the preset "Example: Write result of virtual expression" does seem to work (the default $Len function), however anything using $IsNull or $If seems to fail as above. (Whether used in relation to that preset or in an original one.)

Edit 2: Fails for any function/expression which contains/requires a comma (so anything with more than 1 parameter) - functions which don't (like $Len or $Upper) are ok.  Probably related to the recent $Transliterate fix.
Last Edit: May 12, 2023, 06:46:05 PM by Messiaen

boroda

  • Sr. Member
  • ****
  • Posts: 4595
Probably related to the recent $Transliterate fix.

yes, you are right. i've fixed this, but now you must use TWO commas to separate virtual tag function parameters, e.g. \@eval[[$IsNull("$1",,NULL,,$1)]].

reimport new (or all) presets.

https://www.mediafire.com/file/h2t08o9562efboi/mb_TagTools_latest.zip/file

boroda

  • Sr. Member
  • ****
  • Posts: 4595
i've fixed another \@eval[[]] bug related to tag values containing quotes. Now, if you want to pass a string to a virtual tag function as is, you must put it in DOUBLE quotes, e.g.

\@eval[[$IsNull(""$1"",,NULL,,$1)]]

instead of

\@eval[[$IsNull("$1",,NULL,,$1)]].



reimport ASR presets.

https://www.mediafire.com/file/h2t08o9562efboi/mb_TagTools_latest.zip/file

Messiaen

  • Jr. Member
  • **
  • Posts: 103
Thanks.  The syntax may be getting stranger, but at least it's consistently stranger!  :)

bkev

  • Jr. Member
  • **
  • Posts: 41
Oh no, this latest update seems to have broken a custom preset for me.

The original, which was working before had this:

Search for
^(.*?)(\s*\[Explicit\])?$
replace with
$1

Step 2
Search for
^(.*)
replace with
\@eval[[$If($TagContainsAnyString(<URL>,Lyrics,"\@1"), [Explicit],)]]


I've tried a combination of things but I still can't get it to work.

For, if I change it to this:
\@eval[[$If($TagContainsAnyString(<URL>,,Lyrics,,""\@1""), [Explicit],)]]

It just adds $If($TagContainsAnyString(<URL>,Lyrics,"bad|words"), [Explicit],) to the existing title.

I'm confused!

EDIT

I think I've done it.

I've just replaced all " with "" and doubled up all the commas and it now seems to work. I'll keep testing.
Last Edit: June 02, 2023, 02:15:09 PM by bkev

boroda

  • Sr. Member
  • ****
  • Posts: 4595
could you be more specific? you wrote:

I think I've done it.

I've just replaced all " with "" and doubled up all the commas and it now seems to work. I'll keep testing.

but you have already replaced " by "" in this example (which didn't work for you):

For, if I change it to this:
\@eval[[$If($TagContainsAnyString(<URL>,,Lyrics,,""\@1""), [Explicit],)]]

It just adds $If($TagContainsAnyString(<URL>,Lyrics,"bad|words"), [Explicit],) to the existing title.

I'm confused!

Messiaen

  • Jr. Member
  • **
  • Posts: 103
I think the end of his eval had two comma's which were overlooked for doubling... ""\@1""), [Explicit],)]]

Which is understandable as if you copy his full eval into the preset editor text control, those last few characters would be hidden unless you intentionally scroll through to the end.  You probably never envisioned anyone using excessively long replacement strings when you originally made the box.  I contemplated once about requesting you to make the preset editor WS_THICKFRAME compatible, but considering there's a few dozen controls in there to link, it hardly seemed a practical amount of effort for something so rarely needed.

boroda

  • Sr. Member
  • ****
  • Posts: 4595
Plugin update:

1. numerous typos are fixed in ASR presets. reimport them.
2. several UI/UX bug fixes/adjustments.
3. i've made most input fields auto-scalable in the main ASR window and in ASR preset editor window (which is now resizable and can be maximized like most other plugin windows).

https://www.mediafire.com/file/h2t08o9562efboi/mb_TagTools_latest.zip/file

Messiaen

  • Jr. Member
  • **
  • Posts: 103
I knew you were going to take that too seriously - it really was just a comment and not a real request.  :)

I think this is just a DPI issue, but the new vertical scale is slightly off (the bottom OK/Cancel buttons are cut and the lower "replace" field for all 5 steps are also slightly sheared):



But other than that, the horizontal scaling works as expected.

bkev

  • Jr. Member
  • **
  • Posts: 41
Apologies for not being clear.

In my first attempt I doubled up the " and the , but only within the if statement. I ended up doubling up anywhere there was a " and a , and that seemed to fix it.

could you be more specific? you wrote:

I think I've done it.

I've just replaced all " with "" and doubled up all the commas and it now seems to work. I'll keep testing.

but you have already replaced " by "" in this example (which didn't work for you):

For, if I change it to this:
\@eval[[$If($TagContainsAnyString(<URL>,,Lyrics,,""\@1""), [Explicit],)]]

It just adds $If($TagContainsAnyString(<URL>,Lyrics,"bad|words"), [Explicit],) to the existing title.

I'm confused!

bkev

  • Jr. Member
  • **
  • Posts: 41
I think the end of his eval had two comma's which were overlooked for doubling... ""\@1""), [Explicit],)]]

Which is understandable as if you copy his full eval into the preset editor text control, those last few characters would be hidden unless you intentionally scroll through to the end.  You probably never envisioned anyone using excessively long replacement strings when you originally made the box.  I contemplated once about requesting you to make the preset editor WS_THICKFRAME compatible, but considering there's a few dozen controls in there to link, it hardly seemed a practical amount of effort for something so rarely needed.

Yeah that was it. I missed off some of the end commas and once I doubled those up it worked again.

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9304
Plugin update:
Thanks for the update. It is strictly a coincidence that the plug version is 5.7.8554 and the latest MB version is 3.5.8554?
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here