Using Disc number in audio renaming

Any questions? Need some help?
Post Reply
Bexorcist
Posts: 28
Joined: 20 Dec 2020, 14:48

Using Disc number in audio renaming

Post by Bexorcist »

Heya,


First of all: thank you for your amazing software. My autistic brain adores stuff like this! :D

Now I have a small question. I'm renaming my audio from multi folders to one single folder. For example:

C:\ALBUM\CD 1\01. ARTIST - TRACK

Should become

C:\ALBUM\101. ARTIST - TRACK

I correctly edited all the metadata to include which disc and the total ammount of discs but when I use the {d} command in my code it always shows '1' with every track. Any idea what I'm doing wrong?

Thx in advance!
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Using Disc number in audio renaming

Post by rednoah »

{d} is the airdate. In Music Mode, this would map to some sort of date value, such as 2020-01-30 but never just 1.
:idea: Please read the FAQ and How to Request Help.
Bexorcist
Posts: 28
Joined: 20 Dec 2020, 14:48

Re: Using Disc number in audio renaming

Post by Bexorcist »

rednoah wrote: 30 Jan 2021, 16:06 {d} is the airdate. In Music Mode, this would map to some sort of date value, such as 2020-01-30 but never just 1.
Oh, that explains it. So how can I implement the disc-number then? Any idea?
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Using Disc number in audio renaming

Post by kim »

Try this:

Code: Select all

{media.Album}/{media.PartPosition}{media.TrackPosition + '. '}{media.Performer}{' - ' + media.Track}
or

Code: Select all

{file.dir.dir.name}/{file.dir.name.match(/\d+$/)}{fn.before('-')}{' - ' + fn.after('-')}
Bexorcist
Posts: 28
Joined: 20 Dec 2020, 14:48

Re: Using Disc number in audio renaming

Post by Bexorcist »

Hey Kim,

Both of those do not work and give different error codes:

1. Binding "PartPosition": undefined
2. Pattern not found: (530 670-3) VA-I_Love_The_90s-(530.670-3)-3CD-FLAC-2008-WRE
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Using Disc number in audio renaming

Post by kim »

first of, your files are not all named e.g. "C:\ALBUM\CD 1\01. ARTIST - TRACK" or "all the metadata to include which disc" = FAIL

try this:

Code: Select all

{any{media.Album.slash(' ')}{folder.name}}/{allOf{media.PartPosition}{media.TrackPosition.pad(2) + '. '}{media.Performer}{' - ' + media.Track}.join()}
Post Reply