Three files attached:
- .mte (export config) file
- .txt export output file
- sample .mp3 files
I have titles formatted WW.LL Text ... where WW = week number and LL = lesson number (Coursera lectures)
I want to check these for numbering gaps.
I want to only show "missing" episodes when there's a gap in lesson numbers, not when a week changes. So in the sample .mp3 files below I would only show a missing episode at 04.04
Beatles - 03.06 She.mp3
Beatles - 03.07 Loves.mp3
Beatles - 03.08 Me.mp3
Beatles - 04.01 Yah.mp3
Beatles - 04.02 Nah.mp3
Beatles - 04.04 Blah.mp3
Beatles - 04.05 Ohhh.mp3
Below is the .mte file. The error comes in the first if statement ... $puts(LessonCount,$fmtNum($mid(%title%,4,2))) is getting invoked as though the if statement weren't even there ... both the TRUE and FALSE conditions of the if statement are being processed. LessonCount is being set to the current lesson number even when the week has not iterated.
$filename($getEnv('USERPROFILE')'\desktop\Numbering-Gaps.txt',UTF-8)$loop(%album%)$loop(%title%)
$puts(CurrWeek,$fmtNum($left(%title%,2)))
$if($eql($get(LastWeek),$get(CurrWeek)),$puts(LessonCount,$add(1,$fmtNum($get(LessonCount)))),$puts(LastWeek,$get(CurrWeek))$puts(LessonCount,$fmtNum($mid(%title%,4,2))))
$if($eql($get(LessonCount),$fmtNum($mid(%title%,4,2))),' OKAY: ','# Missing Track: '$puts(LessonCount,$fmtNum($mid(%title%,4,2)))) %album% %title%
$loopend()
$loopend()
Thoughts?
__.___NumberingGaps.mte (834 Bytes)
Numbering_Gaps.txt (248 Bytes)
Beatles.rar (136 KB)