Get max value of %discnumber%

I only want to include the %discnumber% in the filename where maximum value of %discnumber% for an album is > 1.

I could possibly do this is the %discnumber% value is 1/2 etc, but more often %discnumber% is just the number of the disc, or omitted (which is easy to work with).

Tagging with iTunes means the discnumber is always present, even for single disc albums.

the only function that sets the number of discs is the numbering assistant. See the Tools menu.
I would not use iTunes for tagging as it is never really clear whether the data ends up in the files' tags or only in iTunes' database.

I dont want to set the number of discs though. I want to get the maximum value of %discnumber% of an album (if it exists).

There is no other way than to set the "number of discs" in every file.
MP3tag does not look at the previous or the next file to compare values - with the exception of the numbering assistant.


I guess another solution is to edit the tagsources file and add a function to omit the discnumber if the maximum value of it is 1. This should be possible right?

a simple filter like
%discnumber% HAS /1
should show you all the files with 1/1 or even 2/1
so that you could delete the field with the help of the extended tags dialogue (Alt-T).

Sure, but I want avoid button presses as I have a lot of stuff to tag/rename. itunes seems to be the only tag source that sets a discnumber of 1 for single disc albums so I think I can edit that and add some logic to remove that tag before setting it.