Naming Music (Disc Number)

Any questions? Need some help?
Post Reply
benitals
Posts: 2
Joined: 13 Jan 2017, 22:25

Naming Music (Disc Number)

Post by benitals »

Hey everyone,
Can anyone please help me, I'm fluffing my way through this and not having much luck.
I name my music files so that they include the disc number at the beginning of the track number, rather than putting them in separate folders. I have managed to sort out the code so that it does this IF there are more than one disc for an album, but when it use the same code for an album that is only one disc, it displays 'null' before the track number.

This is the code I am using:
C:\Users\benitals\Music\Albums\{albumartist}\{Album} ({Y})\{''+media.'part/position'}{pi.pad(2)} - {t}

If it is a multi-disc album it returns this:
C:\Users\benitals\Music\Albums\The Prodigy\Experience Expanded (2001)\101 - Jericho

If it is a single disc album, it returns this:
C:\Users\benitals\Music\Albums\The Prodigy\Invaders Must Die (2009)\null01 - Invaders Must Die

Any help would be greatly appreciated!
Thanks so much!
User avatar
rednoah
The Source
Posts: 23953
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Naming Music (Disc Number)

Post by rednoah »

Solution:

Code: Select all

{media.PartPosition}{pi.pad(2)} - {t}
:idea: Please read the FAQ and How to Request Help.
benitals
Posts: 2
Joined: 13 Jan 2017, 22:25

Re: Naming Music (Disc Number)

Post by benitals »

Brilliant! That works perfectly, thank you so much!
Post Reply