Skip to content

Checks: Numbering

Track number and disc number field issues.

disc-in-track-number

If the disc number and track number are combined in the track number field with a dash (e.g. track number="2-03") instead of being in separate fields, this is treated as an error. Subsequent checks require track numbers to be numeric.

Dependency

Requires the legacy-fields check to pass first.

Automatic fix: Split the values into track number and disc number fields.

invalid-track-or-disc-number

This check reports when an album has invalid or ambiguous values for track number, track total, disc number or disc total. If these fields cannot be resolved to a single valid number, they are not useful and should be removed.

Rule: for each track, if present, track/disc number/total fields should each have a single value and that value should be a positive number (0 is not valid).

The check message names the fields that have problems (e.g. "tracktotal (multiple values)") and the number of tracks affected. When run interactively, a table lists all tracks with their track number, track total, disc number and disc total values; values that the fix will change or remove are marked (e.g. "9, 09 -> 9" or "0 -> removed").

Dependency

Requires the disc-in-track-number check to pass first.

Automatic fix: For each of the noted fields in each track, discard all values that are non-numeric or 0. If exactly one unique number remains, save it without leading zeros (e.g. values "9" and "09" become "9"). Otherwise, delete the field.

disc-numbering

Reports on issues with disc number and disc total (TPOS in ID3). Optionally, removes redundant disc number field for sets of one. Use the options below to control whether multiple disc sets should be required to have all tracks in one folder. Mismatching disc total values are one reason players incorrectly split albums.

Rules

  • If any track has disc number, all tracks should have disc number
  • Disc numbers should start at 1 and be sequential (1, 2, 3...)
  • If present, the disc total should be the number of distinct disc number values which should be the same as the highest disc number
  • All tracks with disc total should also have disc number
  • The selected disc total presence policy should apply
    • "consistent": either all tracks have disc total, or none do
    • "always": all tracks should have disc total
    • "never": disc total should be removed

Dependency

Requires the invalid-track-or-disc-number and legacy-fields checks to pass first.

Automatic fixes

Disc total policy: If the policy is "never", always remove the field. If the policy is "always", and a consistent total is set on some tracks, set the same total on the others; if no track has disc total, a value can be entered instead.

Missing disc numbers: When some tracks have disc number and some do not, a table lists each track's disc number and disc total, and options are offered to fill in the missing disc numbers. If a disc number can be read from each affected filename (e.g. 2-01) and no filename disagrees with an existing disc number, the missing disc numbers can be set from the filenames; this is applied automatically when the result would be consistent (sequential discs from 1, not exceeding disc total).

If the only disc number present is 1 (and disc total, if present, is 1), the missing disc numbers can be set to 1, or disc number 1 (and disc total 1) can be removed from all tracks; with remove_redundant_discnumber the removal is applied automatically, otherwise setting 1 is. If no option applies, a disc number can be entered to set on the affected tracks.

Redundant disc number: When every track has disc number 1 (and disc total 1, if present), the disc number (and disc total) fields are redundant. With remove_redundant_discnumber they are removed automatically. With discs_in_separate_folders disabled and remove_redundant_discnumber not set, the removal is offered but not applied automatically; with discs_in_separate_folders enabled, disc 1 might be part of a multi-disc set stored in another folder, so no issue is reported.

Option = default Description
discs_in_separate_folders = true if true, discs from one album may be stored in separate folders
remove_redundant_discnumber = false if true, redundant disc number 1 (and disc total 1) is removed
disctotal_policy = "consistent" Set the field presence policy for disc total

Note

discs_in_separate_folders and remove_redundant_discnumber cannot both be true. If discs are in separate folders, disc 1 might be part of a set.

When discs_in_separate_folders is enabled (default), this check will ignore albums that have only one disc of a multiple disc set. But that also means it cannot tell whether an album is missing a disc number or whether disc total is correct. If you can put multiple-disc albums together in one folder, do that and set discs_in_separate_folders to false. Then, if desired, you can also set remove_redundant_discnumber to true.

track-numbering

Reports on several issues with track numbers and track totals, including apparently missing tracks.

Rules (track-numbering)

  • Every track should have a single decimal track number
  • For each disc, track numbers should start at 1 and be sequential
  • For each disc, if track total is present, it should be the number of tracks on that disc
  • All tracks with track total should also have track number
  • The selected track total presence policy should apply:
    • "consistent": either all tracks have track total, or none do
    • "always": all tracks should have track total
    • "never": track total should be removed

Dependency

Requires the disc-numbering check to pass first.

Automatic fixes (track-numbering)

Missing track numbers: If track number fields are missing from some tracks but all track numbers can be guessed from the filename, recreate track number fields from filenames.

The guess is a 1-3 digit number at the start of the filename, optionally after a disc number and dash (e.g. 03 or 1-03). Longer numbers are not track numbers, and a date at the start of the filename (e.g. 2024-01-05) is not a number at all. The fix is not offered if any filename indicates a disc number different from the disc being fixed, or if a track has no track number and no number can be read from its filename.

Track total policy: If the policy is "never", always remove the field. If the policy is "always", and a consistent total is set on some tracks, set the same total on the others.

Option = default Description
ignore_folders = ["misc"] in all folders with these names, ignore track numbering
tracktotal_policy = "consistent" Set the field presence policy for track total

zero-pad-numbers

Apply selected policies for zero-padding in the track number/total and disc number/total fields. Some media players and many file managers do not show tracks in the correct order unless the track numbers are zero-padded, because for example "2" comes after "10" when sorted alphabetically.

This check does nothing on M4A files because track numbers (and track total, disc number, disc total) are only stored as plain unformatted numbers.

Dependency

Requires the invalid-track-or-disc-number check to pass first.

Automatic fix: If no major problems detected in relevant fields, apply policy.

Choose a policy for each field. The policy options are:

  • "ignore": don't check this field
  • "never": do not use leading zeros
  • "if_needed": leading zeros when required for all values to have the same number of digits (same as "never" for track/disc totals)
  • "two_digit_minimum": all values should be at least two digits (three if more than 99 values)
Option Default
tracknumber_pad "two_digit_minimum"
tracktotal_pad "two_digit_minimum"
discnumber_pad "if_needed"
disctotal_pad "never"

The default settings will result in, for example, track 04 of 07 and disc 1 of 1. If you set all policies to "if_needed" instead, you get, for example, track 4 of 7 and track 04 of 12.