Author Topic: Issues with virtual tags  (Read 1133 times)

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34409
I cannot update to v3.5, because it seems like my complex Virtual Tags do not work with it. 😣
can you send me the formulas that dont work

The Incredible Boom Boom

  • Sr. Member
  • ****
  • Posts: 1287
Can you tell why they don't work anymore?
I would expect that those functions are now seamlessly processed by MusicBee?
(except for Xor, which is now gone)

I have no idea. I can't figure out the pattern, other than possibly @Steven incorporating some of the functions from the plugin into MB itself. 😕

can you send me the formulas that dont work

This formula works. I believe because the functions were all present in v3.4.
Code
{color: 255,255,255}$If($And($Contains(<STYLE>,Soundtrack),$IsMatch(<STYLE>,"Classical")="F"),$IsNull(<Album Artist>,<Sort Artist>,<Album Artist>),$If($IsMatch(<STYLE>,"Classical"),<Sort Composer>{font: Lucida Console;Regular;9.75}$RxMatch(<Path>,"\s\(\d{4}-\d{4}\)"){font: default},$IsNull(<Album Artist>,,$If(<Album Artist>=$Replace(<Sort Artist>,&,and),,<Album Artist>))))$If($Contains(<Keywords>,"backing (a)"),<Album Artist>" [with "$RxMatch(<Artists: Performer>,"[A-Z][\w\s(?:and|&|\s)]+Orchestra")],)

The formula below gets reduced down to the very last function.
Before
Code
$If($And($Not($IsMatch(<STYLE>,"^Classical$")),$IsMatch(<Path>,"\\Traditional")="F"),$IsNull(<Title>,,$If($Contains(<TRACKSUBTITLE>,Replace:),$IsNull(<❤️>,,{color: 255,0,0}​)$CutLeft(<TRACKSUBTITLE>,$Len(Replace:)){color: default}*,$IsNull(<❤️>,,{color: 255,0,0}​)<Title>{color: default})){contrast: 75}$IsNull(<TRACKSUBTITLE>,,$If($Contains(<TRACKSUBTITLE>,Replace:),," "<TRACKSUBTITLE>))$IsNull(<SUB-LABEL>,,$If($IsMatch(<STYLE>,"^Classical$"),,$If($Contains(<Keywords>,"backing (a)"),$RxReplace(<SUB-LABEL>,"\s\[with[\w\s(?:and|&|\s)]+Orchestra\]",""),<SUB-LABEL>))){contrast: 60}$IsNull(<Genre>,,$Replace(" ["<Genres>],;,",")){contrast: default},$IsNull(<❤️>,,​)$IsNull(<ACT/MOVEMENT>,,<ACT/MOVEMENT>)$IsNull(<NAMEDPIECE>,,<NAMEDPIECE>)$If($IsMatch(<STYLE>,"Commentary"),<Title>,))$IsNull(<TEMPO DISPLAY>,,<TEMPO DISPLAY>){color: default}{contrast: default}
After
Code
$IsNull(<TEMPO DISPLAY>,,<TEMPO DISPLAY>){color: default}{contrast: default}
There are two other tags like the one above and all three are broken down to everything before the "After" code. $Len() appears in all three.

It's also in this one, which is completely erased in my update to v3.5.
Code
$If($Contains(<Path>,"M:\Classical"),$If($IsMatch(<PERIOD>,"Twentieth Century|Unknown"),<PERIOD>,$If($Contains($Left(<Path>,12),Classical),"("$Split(<Path>,\,4)") ",)<PERIOD>" era")": "$Replace($RxReplace($If($IsMatch(<Genres>,"Sonata|Concerto|Suite|Quintet"),$RxReplace(<Genres>,"^[\s\S]*?(Sonata|Concerto|Suite|Quintet)\s(\w+)[\s\S]*?$","$2 $1"),<Genres>),"(^|\;\s|\b)(Single Piece|Soundtrack|Chamber|Virtuoso\s\(.+\)|Orchestral|Quartet|Concerto)(;\s)",""),;,","),$IsNull(<STYLE>,,$First(<STYLE>)$If($And($First(<STYLE>)="アニメ",$Split(<STYLE>,;,3)!="")="T",,$IsNull(<Genre Category>,,": "<Genre Category>)))$IsNull($Split(<STYLE>,;,2),,$If($Contains(<Genre Category>,$Split(<STYLE>,;,2)),,$Replace($CutLeft($Replace(<STYLE>,"; Soundtrack",),$Len($First(<STYLE>))),;," |")$IsNull(<Genre Category>,,": "<Genre Category>))))
***EDIT: After pasting the tag from v3.4 to v3.5, I get a parsing error that starts at nre Category>,,": "<Genre Category>))))
I don't really know what to look for, though, because it's been working fine. There may have been a change to formulas that I'm forgetting or never saw, though?

However, this tag also contains $Len() and carried over just fine. The use case for $Len() is different than the above, however...
Code
$If($IsMatch(<STYLE>,"Jazz|Bebop|Big Band"),$If($IsMatch(<RECORDINGINFO>,"recorded:.*?\([\d-]+\)(;|$)"),$RxReplace(<RECORDINGINFO>,"^recorded:.*?\(([\d-]+)[\s\S]*?$","$1"),),)$Left(<ORIGINALDATE>,10)$If(<Album Artist>="Various Artists"," "<Album>" ",)$IsNull(<Disc#>,<Year>-00-$Left(<Album>,10)$Right(<Album>,10)-<Kind>-<#️>,$If($Len(<Year>=4),<Album Artist>" "<Year>,)$RxMatch(<Sort Album>,"Volume\s\d+")<Year>)-$If($Contains(<ALBUM DETAILS>,Vinyl),01,$If($Contains(<ALBUM DETAILS>,CD),02,03))-$RxReplace(<Path>,"^[\s\S]*?\[(\w{2})\s[\s\S]*?$","$1")-<Disc-#>) <Album> $If($Len(<ORIGINALDATE>)=4,<ORIGINALDATE>-13-01,<ORIGINALDATE>)
Last Edit: August 04, 2022, 09:21:05 PM by The Incredible Boom Boom

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34409
The tag tools plugin is a little less strict on the validation for CutLeft
This should work for your usage:
https://getmusicbee.com/patches/MusicBee35_Patched.zip

The Incredible Boom Boom

  • Sr. Member
  • ****
  • Posts: 1287
The tag tools plugin is a little less strict on the validation for CutLeft
This should work for your usage:
https://getmusicbee.com/patches/MusicBee35_Patched.zip

🥺🥺🥺 OMG Thank you, @Steven.
My beautiful layout has reappeared and now I can feel included whenever you all are talking about v3.5.

How were you able to figure out where the function wasn't parsing correctly so if there is a possible next time I can fix the code myself?

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34409