Rand() function bug always naming first and second 0041 and 1846



i am converting tag to filename using $num($left($rand(),4),4) %artist% - %title%
but 1st and 2nd file is not random number even if it shows diff number it will save as
0041 %artist% - %title%.mp3
1846 %artist% - %title%.mp3

im doing this before but with version 3.12 it is not working. thanks
ipqp23@gmail.com

I could reproduce it.
The first call of the $rand() function always leads to 0041.
But then the randomizer is started, apparently, and all further calls lead to different values.
The randonizer is reset with the next new start of MP3tag.
So a scenario to reproduce it would be:
Open MP3tag
Select a couple of files
Open Converter>Tag-Filename,
Enter $num($left($rand(),4),4) %artist% - %title%
see in the preview the number 0041
Open the full preview and find the second file with number 1846
Cancel all this
restart the Converter again to see that it shows different numbers and will do so for every further call in this session.
Close MP3tag
Open MP3tag and start with the first step again and the number 0041 will return as first random number.

Thanks for pointing and the additional confirmation! I'll add more randomness with the next release.

1 Like

This is now fixed with Mp3tag v3.13.

thank you for the effort. Mr. Dev
I tried and it is now working.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.