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

redwing

  • Guest
Can you add Date Added as writable field so that the field can be updated without updating files?

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34350
Can you add Date Added as writable field so that the field can be updated without updating files?
i will include "date added" as a field that doesnt update the music file

redwing

  • Guest
i will include "date added" as a field that doesnt update the music file

That'd be great. Thanks!

boroda

  • Sr. Member
  • ****
  • Posts: 4595
Can you add Date Added as writable field so that the field can be updated without updating files?
of course. its already on my todo list.

boroda

  • Sr. Member
  • ****
  • Posts: 4595
new functions:

$Abs(number)

$Now(): returns current local date/time. date/time format depends on your windows regional settings, eg. 12/31/2018 12:59:59 pm. it seems that there is a bug in mb for functions without parameters mb now adds ")" to returned value. hope Steven will fix it soon.

$AddDuration(duration1,duration2): duration format is similar to date/time format without "am/pm" suffix, but allowed values are different, eg. 00/01/0000 00:00:00 is valid duration, but not valid date/time. either date part or time part can be omitted, it will be defaulted to zero value.

$SubDuration(duration1,duration2)

$SubDateTime(datetime1,datetime2): returns duration between datetime1 and datetime2. for datetime1 and datetime2 either date part or time part can be ommited, it will be defaulted to current date or time 00:00:00 am.

$NumberOfDays(datetime1,datetime2): returns number of days between datetime1 and datetime2 rounded down to nearest integer value.

$AddDurationToDateTime(datetime,duration)

$SubDurationFromDateTime(datetime,duration)

--------------------

still to do: make date added tag writable.

--------------------

http://www.mediafire.com/file/zvdnpbsrky8dg7a/mb_TagTools_2018-02-14.zip


redwing

  • Guest
Can you support $NumberOfDays use current date as default datetime1 (1 rather than 2 because current date would be greater than most of other date tags) when it's not set so that $NumberOfDays(<Date Added>) would return days between current date and date added?

And if you make other functions work the same way, maybe $Now() won't need to be supported as a separate function that is not working correctly having no parameters.
Last Edit: February 14, 2018, 10:29:41 PM by redwing

boroda

  • Sr. Member
  • ****
  • Posts: 4595
optional parameters in custom functions are not supported by mb, but i've made a simple workaround.
its now possible to use word 'Now' in 1st parameter of these functions:

$SubDateTime(Now,datetime)
$NumberOfDays(Now,datetime)
$AddDurationToDateTime(Now,duration)
$SubDurationFromDateTime(Now,duration)


http://www.mediafire.com/file/n96615hjv5ucfx2/mb_TagTools_2018-02-15.zip
Last Edit: February 15, 2018, 05:07:43 AM by boroda74


boroda

  • Sr. Member
  • ****
  • Posts: 4595
a new function is added: $Now(). returns current date/time. is working fine with mb 3.2 latest patch.

http://www.mediafire.com/file/8hmvlyvn39l85rp/mb_TagTools_2018-02-21.zip

use

$SubDateTime($Now(),datetime)
$NumberOfDays($Now(),datetime)
$AddDurationToDateTime($Now(),duration)
$SubDurationFromDateTime($Now(),duration)

instead of

$SubDateTime(Now,datetime)
$NumberOfDays(Now,datetime)
$AddDurationToDateTime(Now,duration)
$SubDurationFromDateTime(Now,duration)

redwing

  • Guest
Like this request (https://getmusicbee.com/forum/index.php?topic=24547.0) it would be great if search & replace can convert multiple values at once for a given tag. How about adding a new "Multiple Search & Replace" command to the plugin that allows people to list a great number of paired search and replace values and converts them one shot? Also allow to list multiple values for search for a single replace value, when entering paired values.

boroda

  • Sr. Member
  • ****
  • Posts: 4595
this is already supported, but there are only a few steps available. i dont think i can make something better. not to speak about somethng universal. as hiccup has written its aready possible to use virtual tags for these purposses.

redwing

  • Guest
Of course every conversion is possible if you add $Replace function hundreds of times to the virtual tag formula. For instance, look at these examples (https://getmusicbee.com/forum/index.php?topic=9317.msg106131#msg106131). The problem is such an approach is not practical at all. Also it's very hard to create and modify such complex formula.

If you want to use the current ASR functionality for that, that's fine. Simply change its layout for this special command to support a large number of steps. No need to add tag selection box for each step. Then each line can offer two boxes for a paired search & replace values. If you add a scrollbar, tens of lines can be offered to enter values. What do you think?

redwing

  • Guest
Another approach would be to implement a new virtual function that makes it easy to search and replace multiple values.

$MReplace(<Title>,(aaa)(bbb)(ccc),(AAA)(BBB)(CCC))

I got the idea from how Notepad++ supports the feature:

Find: (aaa)|(bbb)|(ccc)
Replace: (?1AAA)(?2BBB)(?3CCC)

If you support the function for ASR presets as well, current five steps could convert a lot of values at once without implementing a new command.

boroda

  • Sr. Member
  • ****
  • Posts: 4595
yes, after some thinkig my idea is very like to your ideas. also new asr preset is more preferable than new virtual tag function, just because any preset can be used as function, but i cant use function in preset. i think i'll add support for new preset tomorow.