Help with script for exporting cover art

Basically, I want my album folders (my library goes album artist>album) to have the cover art in the following way: - .jpg. Thats's because I've chosen to have multi-disc albums with separate covers as one single album, so I need to append the discnumber to differentiate them.

The problem is: some of my discnumbers are a single digit, others are */1, */4, **/10, etc, so I need to trim the '/' and whatever comes after it. I've tryed the following expression and some alternatives, but didn't get it to work:

%path%/%album% - $trimRight(%discnumber%,(/.))

Any ideas?
Thank you!

I think, it should be %_path% ... but if you want to save the cover in the current folder anyway, you can leave that out.
So it would
%album% - $num(%discnumber%,1)
of if the %discnumber is not always filled
%album%[ - $num(%discnumber%,1)]

That's a padding function, right? I thought about going that way, but the problem is that I've got an album with 10 discs, so padding to a single digit won't work.

(About %path%: I've found it in Mp3Tag's default fields, there's %path% and there's %_directory%, not sure what's the difference, but since I won't need'em, whatever :slight_smile: )

Yes, that plus it transforms any text into its numerical value, starting at the front.
So it cuts away anything that is following a character that is not a number.
1/2 will become just "1" as the slash is no numeric character.
So 10 discs should come out just fine.
The ",1" I added was to avoid padding with leading zeros.

No, it is still %_path% with a leading underscore, see the help on MP3tag variables:
http://help.mp3tag.de/options_export.html

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.