Pad track number in tags with zeros

Hello,

I’m new to Beets and i’m unable to find this information anywhere.

How can i format the “track number” field directly sotred inside the MP3 tags by padding the value with 0 as a prefix (depending on the size of the current track number : 1 will be padded as “01” and “12” will of couse be kept as is).

1 Like

That’s not currently possible; sorry! Our tag abstraction layer exposes these values as integers, not strings, so beets doesn’t give you control over that kind of detail.

I would also love to see album numbers and track numbers be zero-padded. Any chance this may change in the future?

Thanks!

Rob

Hello, its been a few years, so I’m just wondering if this capability was ever added.

Not a big deal to drop a folder into MP3tag to pad the track#, but if beets can do it that’d be great.

mediafile still exposes track as an integer, so this isn’t supported at the moment. It’s a bit of a hack but you could possibly look at using the hook plugin with the after_write event to modify the file’s metadata yourself once beets is done with it.