Dear Phil,
In the same spirit as the other thread (https://exiftool.org/forum/index.php?topic=11458.0) about TrackNumber and DiskNumber in the QuickTime ItemList group, I'd like now to suggest that it might be a good idea to modify the corresponding ValueConv entries as well. Currently they are both defined as:
length($val) >= 6 ? join(" of ",unpack("x2nn",$val)) : \$val
As it is, this returns, say, "5 of 0" or "2 of 0" when the total number of tracks or disks is unknown. Here is an output from the exiftool application:
Track Number : 5 of 0
Disk Number : 2 of 0
I suggest ValueConv should conservatively read as follows:
my @a = unpack("x2nn",$val); pop @a if @a>1 && !$a[1]; length($val) >= 6 ? join(" of ", @a) : \$val
which simply shortens the array if the last element is zero, and so prevents join from needlessly appending an " of 0" to an integer. Here is a new output from the application:
Track Number : 5
Disk Number : 2
This will also make ValueConv the inverse of the updated ValueConvInv. Please find another diff file attached.
Thanks again. :)
This will appear in ExifTool 12.02 when it is released. (I had already done this when I allowed writing as in integer)
- Phil
Great! Thanks.