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


boroda

  • Hero Member
  • *****
  • Posts: 5234
@boroda74
perhaps the Decimal data type will work better?
Steven, thanks for advice, i'll try decimal type if the problem reoccurs.

redwing

  • Guest
I don't see any differences. For me $Sub(7.6,7) returns 0.5999999046

boroda

  • Hero Member
  • *****
  • Posts: 5234
i've switched from float type to decimal type for arithmetic functions. log functions are still using float type.

http://www.mediafire.com/file/aylmg5xonsyioc1/mb_TagTools_2018-02-03.zip

redwing

  • Guest
Thanks! Now it no longer needs $Round function for every arithmetic. I'll edit again the guide posts.

boroda

  • Hero Member
  • *****
  • Posts: 5234
just have found that number_of_digits in $Round(number,number_of_digits) may be negative to round a number to dozens, hundreds, thousands, etc. :)

redwing

  • Guest
It doesn't work for me that way. I'm getting an error with a negative number for the number of digits.

Or did you mean you could implement that? It would be nice for formatting large numbers, but $Div could be used for that along with the current $Round.
Last Edit: February 04, 2018, 12:30:16 PM by redwing

boroda

  • Hero Member
  • *****
  • Posts: 5234
hmm... i've supposed this because second parameter in .net Math.Round() function is *signed* integer. \:

as for implementing this by myself its possible and easy, but i dont think there are real use cases.

redwing

  • Guest
How about supporting $Len function that returns the number of characters in the given string?
It can be used for checking file URL length, for instance.



phred

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10272
@boroda74-

While syncing a few thousand tracks to my portable, I noticed that a lot of Albums, Album Artists, and Artists came across as "Name, The" and I had specifically changed that in MB's Sorting Tab. But obviously I missed a lot of them.

Using AT&RT, I was able to get rid of ", The" on thousands of tracks in just a few minutes. But I had to run it three times - once for each tag.

I copied the default preset and tried to add two other tags for a total of three: Sort Album, Sort Album Artist, Sort Artist. But this new preset is only looking at one tag. How can I get it to look at all three tags and if found, remove ", The" from the end of the tag.

Thanks once again for your great time saver. And for any help you can provide in making it look at three tags at the same time.
Last Edit: February 07, 2018, 08:16:40 PM by phred
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

boroda

  • Hero Member
  • *****
  • Posts: 5234
phred, strange, but this is working fine for me:

Code
step 1:

search for: ^(.*), The
replace with: $1

step 2:

the same as above, but for another tag

step3:

the same

redwing

  • Guest
A few more function requests. No need to hurry:

$Name(abc.def.gh.mp3) returns abc.def.gh

$CutLeft(abcde,2) returns cde (while $Left(abcde,2) returns ab)

$CutRight(abcde,2) returns abc (while $Right(abcde,2) returns de)

$RoundDown(4.28,1) returns 4.2

$RoundUp(5.2,0) returns 6

$Mod(8,3) returns 2

Some of those are only possible using regex or complex formula (to work in all cases), so it will help people to create a template they need right away. Thanks!
Last Edit: February 06, 2018, 11:21:09 AM by redwing