-
Notifications
You must be signed in to change notification settings - Fork 0
Code Examples
To make code examples easier to read, examples will be provided in an expanded syntax, that needs to have the spaces, and line return characters removed. In most code editors you can do this with a simple find and replace command (ctrl+R) or (cmnd+R).
Matches 4 Spaces, or page return, or new line
( |\r|\n)
"The Beatles"
to "Beatles, The"
It's sometimes useful to sort band names by the 2nd word, skipping a common word or article like The.
[IFVALUE]
album artist,
[IFEQUALS]
album artist,
The[DEL]1,4,[album artist][],
[TRIM][DEL]1,4,[album artist][], The[]
[],
[IFEQUALS]
artist,
The[DEL]1,4,[artist][],
[TRIM][DEL]1,4,[artist][], The[]
[]
[]
[IFVALUE]album artist,[IFEQUALS]album artist,The [DEL]1,4,[album artist][],[TRIM][DEL]1,4,[album artist][], The[][],[IFEQUALS]artist,The [DEL]1,4,[artist][],[TRIM][DEL]1,4,[artist][], The[][][][]
[IFVALUE]disc,[disc]-,[][track]
Depending on your configuration, the year field is sometimes rendered as yyyy mm dd. So, if you want to guarantee that you only have the year value you can use the below code snippet.
[GRAB]1,4,[year][]
[UPPER][GRAB]1,1,[artist][][][LOWER][GRAB]2,,[artist][][]
A\Aerosmith
M\Madonna
[GRAB]1,1,[artist][]\[artist]
To zero pad a disc or track number to (2) places, use ASCII Char #48
for 0
01
[SETLEN]2,48,,[disc][]
To make a decades folder, and hash albums from years like 1995, 1984, 2007 into respectively 1990's
, 1980's
, and 2000's
[SETLEN]3,32,32,[year][]0's
To get a unique Artist folder for missing metadata; first configure dBpoweramp to insert Unknown Artist
. Then, you can catch Unknown Artist
and insert it's unique cddb_id
. This will generate string as a unique artist for that disc.
This can also be used to create a unique album ID for either an unknown artist, or unknown album title.
[IFEQUALS]artist,Unknown Artist,Unknown Artist ([cddb_id)[]