export %length_minutes%?

hi there, i made a simple export template:

$loop(%track%)$num(%track%,2) %title%

now i want to print "95 minutes" instead of "1:35:00" or "5700 seconds".
how can i do some simple calculation? i only found about string functions...

thx in advance :slight_smile:

Formatstring examples ... 1. $div(%_length_seconds%,60)' min and '$mod(%_length_seconds%,60)' sec' 2. $div(%_length_seconds%,60)' min'$ifgreater($mod(%_length_seconds%,60),0,' and '$mod(%_length_seconds%,60)' sec',) 3. $div(%_length_seconds%,60)':'$num($mod(%_length_seconds%,60),2)' min' 4. $div(%_length_seconds%,60)'.'$div($mod(%_length_seconds%,60)'000',60)' min' $div(%_length_seconds%,60)'.'$div($mul($mod(%_length_seconds%,60),1000),60)' min' Results ... %_length_seconds% = 395 1. '6 min and 35 sec' 2. '6 min and 35 sec' 3. '6:35 min' 4. '6.583 min' %_length_seconds% = 5700 1. '95 min and 0 sec' 2. '95 min' 3. '95:00 min' 4. '95.0 min'


thank you it works well.

but somehow i now messed up:
i want the length of all Tracks but the export only gives me the length of the 1st Track.

all files are processed but %length% now has only the time of the first track...

i also tried to workaround by using $puts $get and $add but don't really understand the typo...

Export Mp3tag Global Placeholders

$filename($getEnv('TEMP')'\Test.txt',ANSI)'Mp3tag version: '%_app% 'Following values are provided without a previous "loop/loopend" structure.' 'Total number of files (%''_total_files''%): '%_total_files% 'Total file size (formatted output) (%''_total_size''%): '%_total_size% 'Total file size in bytes (%''_total_size_raw''%): '%_total_size_raw% 'Total playing time (formatted output) (%''_total_time''%): '%_total_time% 'Total playing time (formatted output without days) (%''_total_time2''%): '%_total_time2% 'Total playing time in seconds (%''_total_time_raw''%): '%_total_time_raw%


Example export script, returns for one album a tracklist ordered by CD ...

1: $filename($getEnv('USERPROFILE')'\Desktop\'$validate(%ARTIST%'.'%ALBUM%'.Tracklist.txt',),UTF-16)

2: %ARTIST%' - '%ALBUM%' - '%YEAR%
5: $puts(my_Counter,0)$loop(%_filename%)$num($put(my_Counter,$add($get(my_Counter),1)),2)'.'$char(9)%TITLE%$char(9)%_length%
6: $loopend()'---'$char(9)'Gesamtdauer'$char(9)%_total_time2%
8: $loopend()