Use the track_position attribute if it's available as the track number.
This ensures we get the right track number for things like multi-disc
albums. Without this, tracks seem to follow the order in which they have
been added, which does not match the actual track numbering.
)
},
metadata=self.parse_metadata_track(track=track),
- track_number=position,
+ track_number=getattr(track, "track_position", position),
position=position,
disc_number=getattr(track, "disk_number", 0),
)