Leading Zero in Disc Number (discnumber) goes away

I have a Multi-book series I'm organizing with mixed file formats. Most of them are M4B with a few M4A but there is one book that won't allow me to add a leading zero but all the other ones are ok. This is important since I use Plex to store them and in any series with more than 9 books without leading zeros, it has a fit with sorting.

The only thing I can think of is that it's the only book in this series split up into multiple files but this isn't the first time it has happened either. Any thoughts?


I don't quite understand your screenshot according to your text.
The screenshot shows us a lot of m4b files with tracknumbers that have no leading zero and 1 file that has a leading zero. The filenames just look the other way.
So could it be that you are want to change the filename to leading zeros and not the tracknumber?


It's important whether we talk about filenames or tags here. In MP4 files the track number in the tags is stored as integer values, so no leading zeroes there.

For the filenames it would be important to understand how you generate them.

Also I would assume Plex uses the tags, not the filenames to sort. But I might be wrong.

1 Like

Apologies for the confusion as I definitely could've explained it better.

For my purposes the file name is not important and I rarely ever change them. You are correct in that Plex only really cares about file tagging for proper sorting. And to be fair, the combination of MP3Tag and Plex has been excellent 99% of the time. I've been extremely happy with the setup!

But every once in a while, I come across a file or files in my collection - regardless of file type or number of files - where it simply will not put the leading zeros in the discnumber field. I can't seem to find a common denominator as to the cause. I should've highlighted it but in the example of my screenshot I was referring to how the "Uncrowned" files are "7" while the "Underlord" file is "06".

My sorting in Plex is unique in that I store multi-book series under one album that has multiple discs (where the discs are the books). If the "album" has more than 9 discs, it will place disc 10 after disc 1 when sorting hence the need for leading zeros.

It's along the same lines of sorting by track number. If you don't have leading zeroes, it can do funny things if you have a lot of tracks and sort by track number.

This is only true if the player does not know that mp4 tags have an integer as value in the field so that these files have to be sorted numerically whereas other tag format have a "numerical string" which has to be sorted alphabetically.
The problem that you see a leading zero in an alleged mp4 file would be subject to a different investitgation.

I'll do some experimenting later since it's been over a year since I last tried and see what happens.