3
# Store the original filename for later use.
6
## Retrieve audio metadata.
7
audio.gettags "artist|TPE1,album|TALB,title|TIT2,date|year|TDRC,tracknumber|TRCK" "UNKNOWN"
8
# Stack: artist, album, title, date, tracknumber
13
# Replace "/"s in the date with "-"s.
17
# Turn tracknumbers like "1/12" into 1.
25
# Duplicate the filename again, to determine the extension.
31
# Read the filename format from a user config, if available.
32
audio.confvar filenameFormat "%(tracknumber)02d. %(title)s%(ext)s"
39
## Read the directory format from a user config, if available.
40
audio.confvar directoryFormat "%(artist)s/%(album)s (%(date)s)"