Playlist from Tag

Hi Ohrenkino, you are absolutely right.

In my case, the goal is to create playlists according to purchase dates.
The purchase date is in the %origyear% tag.
There are however 2 other cases: m4a (%itunespurchasedate%) or a file for which I no longer know the purchase date.

Before starting, I fill the empty %origyear% with the action:

$if2(%origyear%,$if2($left(%itunespurchasedate%,10),$left(%year%,4)-01-01))

ps: thanks to this, I don't need to use the filter function anymore as my %origyear% is not empty anymore :yum:

rearrange by column %origyear%

then export function script (adapted from topic: Export Splitter - Dano) to create an *.m3u:

$filename($getenv(TEMP)\Mp3tag Split Export.txt,utf-8)$loop(%origyear%)#*=====START=====*M:\Playlists\Achat - $validate($if2(%origyear%,$left(%year%,4)-01-01),_).m3u

$loop(%_folderpath%)$loop(%_path%)%_path%
$loopend()$loopend()#*=====END=====*
$loopend()

3 things :

  1. the file is created in a Temp folder => no change because the .exe point there (path+name)
  2. if no %origyear%, Year-01-01 is the name of the playlist
  3. a first blank line need to be placed in the export file, if not, the first music item will not be read by most program

then run the program from Dano,
Playlists will be in this example in the M:\Playlists\ (cfr export file)

Guimms